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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort versions when running "cmrel staged" and add cmrel staged --help #35
Conversation
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.
Thanks for making the CLI help so much clearer.
I added a nitpick / question about sorting by semver rather than by string.
Happy to merge as-is with an issue for future improvement, if you prefer.
d538ce9
to
93bdf4c
Compare
Signed-off-by: Ma毛l Valais <mael@vls.dev>
Signed-off-by: Ma毛l Valais <mael@vls.dev> Co-authored-by: Richard Wall <richard.wall@jetstack.io>
This column was always set to 'UNKNOWN', and I was not able to find where the creation timestamp of a given folder in the bucket is, so removing this column makes sense. Signed-off-by: Ma毛l Valais <mael@vls.dev>
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.
Looks good @maelvls
I tested it by doing a full listing and a specific version listing.
Both worked.
I noticed a few unrelated problems with it, all of which we can fix in future PRs:
- The version is printed to stderr rather stdout
- There's no way to print only the version, or release-name
- The CLI --help description talks about a
--release-name
option, but I don't see that listed in:
$ go run ./cmd/cmrel staged --help
...
Flags:
--bucket string The name of the GCS bucket containing the staged releases. (default "cert-manager-release")
--git-ref string Optional specific git reference to list staged releases for - if specified, --release-version must also be specified.
-h, --help help for staged
--release-type string The type of release to list, usually one of 'release' or 'devel' (default "release")
--release-version string Optional release version override used to force the version strings used during the release to a specific value.
Global Flags:
--debug If true, output from sub-commands will be directly piped to stderr.
@@ -12,6 +12,7 @@ require ( | |||
github.com/spf13/cobra v1.1.3 | |||
github.com/spf13/pflag v1.0.5 | |||
github.com/stretchr/testify v1.6.1 | |||
golang.org/x/mod v0.4.1 // indirect |
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.
We should add a verify-go-mod script because this isn't indirect
any more and go mod tidy
fixes that.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: maelvls, wallrj 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 |
/lgtm |
Running
staged
was quite confusing since the versions would show in some random order. It now sorts versions lexicographically which means that the bottom lines are the latest tags.Before:
After:
The
--help
had been copied from thestage
command, so it was not really helpful. I tried to improve the help a little 馃槄Before:
After: