Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add version command and ldflags #27

Merged
merged 1 commit into from
Jan 22, 2022

Conversation

cpanato
Copy link
Member

@cpanato cpanato commented Jan 22, 2022

What type of PR is this?

/kind feature

What this PR does / why we need it:

  • add version command and ldflags

to help in debug and inform the user which version they are using

$ ./output/bom-darwin-amd64 version
______  ________  ___
| ___ \|  _  |  \/  |
| |_/ /| | | | .  . |
| ___ \| | | | |\/| |
| |_/ /\ \_/ / |  | |
\____/  \___/\_|  |_/
bom: A tool for working with SPDX manifests

GitVersion:    v0.1.0-64-ga8d39d8
GitCommit:     a8d39d8
GitTreeState:  dirty
BuildDate:     2022-01-22T17:25:52Z
GoVersion:     go1.17.6
Compiler:      gc
Platform:      darwin/amd64

/assign @puerco @justaugustus @xmudrii @Verolop @saschagrunert
cc @kubernetes-sigs/release-engineering

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Signed-off-by: Carlos Panato <ctadeu@gmail.com>
@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 22, 2022
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 22, 2022
@cpanato
Copy link
Member Author

cpanato commented Jan 22, 2022

using the doom font > bom doom
/joke

@k8s-ci-robot
Copy link
Contributor

@cpanato: My friend told me that pepper is the best seasoning for a roast, but I took it with a grain of salt.

In response to this:

using the doom font > bom doom
/joke

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@justaugustus justaugustus added this to In progress in Release Engineering (k-sigs) via automation Jan 22, 2022
Copy link
Member

@justaugustus justaugustus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpanato -- Approving to move this along, but...

I feel like we write a version package/version for multiple projects. Could we abstract/de-dupe?

Consider writing this as a package in sigs.k8s.io/release-utils that can be an importable cobra.Command.

See https://github.com/kubernetes/enhancements/tree/master/pkg/kepctl/commands for an example, as well @n3wscott's comments in kubernetes/enhancements#2387 (review) for more background.

Release Engineering (k-sigs) automation moved this from In progress to Review in progress Jan 22, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cpanato, justaugustus

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [cpanato,justaugustus]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@justaugustus
Copy link
Member

Consider writing this as a package in sigs.k8s.io/release-utils that can be an importable cobra.Command.

Created kubernetes-sigs/release-utils#23 to discuss.

@justaugustus
Copy link
Member

GitHub reviews should act as /lgtm + /approve for SIG Release repos.
Filing an issue for this...
Original issue: kubernetes/sig-release#1464
Implementation example: kubernetes/test-infra#20934
cc: @kubernetes-sigs/release-engineering

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 22, 2022
@justaugustus
Copy link
Member

Filing an issue for this...

#28

@k8s-ci-robot k8s-ci-robot merged commit 5f4d447 into kubernetes-sigs:main Jan 22, 2022
Release Engineering (k-sigs) automation moved this from Review in progress to Done Jan 22, 2022
@cpanato cpanato deleted the version branch January 25, 2022 09:24
@puerco puerco mentioned this pull request Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Development

Successfully merging this pull request may close these issues.

None yet

7 participants