Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
So `make build`, `make install` and `goreleaser build` produce the exact same binary. The fix consists mainly of tuning the ldflags of the Makefile and of the .goreleaser file: - arguments must be in the same order - removed `-X main.commit` and `-X main.date` as these are the default ldflags of goreleaser and were probably blindly reported in the custom version, but are actually useless as there is no `commit` or `date` field in the main package of the application. - replaced tendermint/tendermint by cometbft/cometbft A couple of other tiny things had to be updated: - align the version name when there's no tag (snapshot.template_name in goreleaser and VERSION var in Makefile) - fix Makefile VERSION var when there's a tag - add CGO_ENABLED=0 in Makefile - remove double quotes around the BuildTags ldflag because it's useless and goreleaser doesn't use double quotes. Quick demo: ```sh $ make build install $ TM_VERSION=v0.37.4 goreleaser build --single-target --clean --snapshot $ sha256sum $GOBIN/atomoned build/atomoned dist/atomoned_linux_amd64_v1/atomoned 9a654d794956e35ca25469c4bb4b074bf041acc1f579a02872eab20144dece5a $GOBIN/atomoned 9a654d794956e35ca25469c4bb4b074bf041acc1f579a02872eab20144dece5a build/atomoned 9a654d794956e35ca25469c4bb4b074bf041acc1f579a02872eab20144dece5a dist/atomoned_linux_amd64_v1/atomoned ``` If go1.21 is not available you can install it using: `go install golang.org/dl/go1.21.13@latest` then prefix the first 2 commands with: `GOROOT=$(go1.21.13 env GOROOT) PATH=$GOROOT/bin:$PATH`
- Loading branch information