-
Notifications
You must be signed in to change notification settings - Fork 426
feat(gnokey): add gnokey version
subcommand
#4598
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
base: master
Are you sure you want to change the base?
Conversation
🛠 PR Checks SummaryAll Automated Checks passed. ✅ Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🟢 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Hello hey thanks for your PR, it seems already doing what it is supposed to, |
… into gnokey-version-subcommand
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.
nice 👍
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.
I think maybe gnovm/pkg/version should be moved to tm2/, so that then all binaries can refer to that as a version
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.
It's a good start, but I think we can make it even better 🙌
# user for gnokey version [branch].[N]+[hash] | ||
VERSION ?= $(shell git describe --tags --exact-match 2>/dev/null || echo "$(shell git rev-parse --abbrev-ref HEAD).$(shell git rev-list --count HEAD)+$(shell git rev-parse --short HEAD)") | ||
|
||
GOBUILD_FLAGS ?= -ldflags "-X github.com/gnolang/gno/tm2/pkg/version.Version=$(VERSION)" |
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.
What do you think about doing just:
VERSION ?= $(shell git describe --tags --long --dirty --always)
GOBUILD_FLAGS ?= -ldflags=-X=github.com/gnolang/gno/tm2/pkg/version.Version=$(VERSION)
I'm not entirely convinced we need the branch name, if the commit hash is there 👀
cc @gfanton
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.
Also, don't we already version something like gnodev?
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.
I applied the version format used for the binary subcommand gno version
Also, very important point: Can you make sure these build changes are reflected in our release processes (goreleaser)? 🙏 cc @sw360cab |
Can you make sure the CI passes? |
Done @thehowl |
Demo:
resolves #4595