-
Notifications
You must be signed in to change notification settings - Fork 4
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
chore: improve Makefile and release docs #37
Merged
tbruyelle
merged 16 commits into
atomone-hub:main
from
tbruyelle:tbruyelle/chore/makefile-cleanup
Oct 25, 2024
Merged
chore: improve Makefile and release docs #37
tbruyelle
merged 16 commits into
atomone-hub:main
from
tbruyelle:tbruyelle/chore/makefile-cleanup
Oct 25, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- remove not working draw-deps target - remove unused contrib/devtools/Makefile - use `go run` instead of `go install && ./binary` - remove build-linux which doesn't provide reproducible builds - remove deprecated build-docs target - remove deprecated distclean target - remove useless format-batch target - update .PHONY properly
Prevent having `ledger` build tag without CGO, which has no effect on ledger support. Now it's possible to build a binary with ledger support by providing `LEDGER_ENABLED=true` appended to the makefile command. `make build-ledger` is kept for convenience but call `make build LEDGER_ENABLED=true` under the hood.
the default value should be good enough.
downgraded gofumpt and gorealeaser for this reason
- Ensure goreleaser uses the newly created tag - Ensure goreleaser uses the expected go version - Keep dist folder and print sha256sum files
This works by replacing `go-version: XX` by `go-version-file: go.mod` Remove `make print_required_go_version` because it's no longer required
GO_SYSTEM_VERSION from go env GOVERSION bc that requires less transformation
kristovatlas
approved these changes
Oct 24, 2024
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.
Skimmed the code quickly, looks good.
Testing results:
I was able to make build
on darwin64.
% make build
--> Ensure dependencies have not been modified
all modules verified
go build -mod=readonly -tags "netgo" -ldflags '-X github.com/cosmos/cosmos-sdk/version.Name=atomone -X github.com/cosmos/cosmos-sdk/version.AppName=atomoned -X github.com/cosmos/cosmos-sdk/version.Version=v1.0.0-a8dea4ca -X github.com/cosmos/cosmos-sdk/version.Commit=a8dea4ca910c77d60eec78599abce6bfc7ff17de -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo -X github.com/cometbft/cometbft/version.TMCoreSemVer=v0.37.5 -w -s' -trimpath -o /Users/redacted/Documents/GitHub/atomone/build/ ./...
% ./build/atomoned
Stargate Cosmos Hub App
Usage:
atomoned [command]
...
% openssl dgst -sha256 build/atomoned
SHA2-256(build/atomoned)= 0b1f75c703140541eb7775b35d59fbee3f54f54f3e05792ce4b2beaabdfaf646
I did not test goreleaser as there wasn't a tag to test it against.
giunatale
approved these changes
Oct 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #32
Improvement list:
build-linux
that breaks reproducible buildsdraw-deps
which no longer worksgo run
instead ofgo install && ./binary
contrib/devdeps
go run -modfile contrib/devdeps/go.mod <module>
to run a declared dev toolbuild-docs
targetdistclean
targetformat-batch
target.PHONY
properlyTM_VERSION
setting in Makefilemake print_tm_version
to get TM_VERSIONgo
1.21.13` preciselygo-version-file: go.mod
instead ofgo-version: 1.21
in gh actionLEDGER_ENABLED=false
which removesledger
build tagmake build/installl LEDGER_ENABLED=true
build-ledger
for user usage but callsmake build LEDGER_ENABLED=true
under the hoodmake create-release-dry-run
improvementsdist
dir for other usage