-
Notifications
You must be signed in to change notification settings - Fork 451
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
Setup goreleaser for gwctl to generate binaries for various platforms #3038
base: main
Are you sure you want to change the base?
Setup goreleaser for gwctl to generate binaries for various platforms #3038
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gauravkghildiyal 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:
Approvers can indicate their approval by writing |
f411b84
to
997fc07
Compare
- go mod tidy | ||
- go build -o ./dist/gwctl ./main.go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At some point, both this and the repo CI should probably include a test suite. Much larger change, non-blocking for this one, but something to put on your todo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely yes.
/lgtm |
/retest |
# For local testing, use: | ||
# | ||
# goreleaser release --snapshot --clean | ||
project_name: gwctl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we intend to keep gwctl as a standalone binary or as a kubectl plugin? If it is both, then wouldn't it be better to name the binary kubectl-*
?
func newVersionCommand() *cobra.Command { | ||
cmd := &cobra.Command{ | ||
Use: "version", | ||
Short: "Print the version information of gwctl", | ||
Long: `Print the version information of gwctl, including version, git commit and build date.`, | ||
Run: func(*cobra.Command, []string) { | ||
fmt.Println(version.GetVersionInfo()) | ||
}, | ||
} | ||
return cmd | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Shouldn't this be moved to a separate file like the rest of the subcommands?
PR needs rebase. 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-sigs/prow repository. |
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
I'll take a look into it /cc |
What type of PR is this?
/kind feature
What this PR does / why we need it:
gwctl version
command to print binary information.NOTES for the reviewer:
Does this PR introduce a user-facing change?: