-
Notifications
You must be signed in to change notification settings - Fork 373
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
feat: add gno version command #3002
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3002 +/- ##
==========================================
+ Coverage 63.09% 63.14% +0.04%
==========================================
Files 548 549 +1
Lines 78514 78644 +130
==========================================
+ Hits 49541 49659 +118
- Misses 25627 25639 +12
Partials 3346 3346
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Can you fix the failed CI test?
|
Please, be aware of this -> #2755 (comment) |
I've modified |
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.
A few notes:
- Instead of having this in cmd/gno, make a package
gnovm/pkg/version
, withvar Version = "develop"
- This will default to "develop" as a version, when somebody uses
go install
/go build
directly. - It also allows us to eventually have this as
gnoland version
, too.
- This will default to "develop" as a version, when somebody uses
- The ldflag should also go in the goreleaser set up:
.github/goreleaser.yml
######################################## | ||
# Dev tools | ||
.PHONY: build | ||
build: | ||
go build $(GOBUILD_FLAGS) -o build/gno ./cmd/gno | ||
go build -ldflags="-X main.buildVersion=$(VERSION) -X main.commitHash=$(VCS_REF) -X github.com/gnolang/gno/gnovm/pkg/gnoenv._GNOROOT=$(GNOROOT_DIR)" -o build/gno ./cmd/gno |
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.
Can you extend the existing GOBUILD_FLAGS?
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.
These txtars test nothing :P
I've added the
version
command to gno to get the version of gno that is installedContributors' checklist...
BREAKING CHANGE: xxx
message was included in the description