Skip to content
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

fix(.goreleaser.yml): Load version for wasmvm dynamically #1631

Merged
merged 4 commits into from
Oct 10, 2023

Conversation

Unique-Divine
Copy link
Member

@Unique-Divine Unique-Divine commented Oct 9, 2023

Purpose

The changes here should make goreleaser load whichever version is stated in our go.mod.

@Unique-Divine Unique-Divine requested a review from a team as a code owner October 9, 2023 21:03
@Unique-Divine
Copy link
Member Author

@NibiruChain/backend , how should I test this? Just tag a prerelease and then delete it?

@helder-moreira
Copy link
Contributor

@NibiruChain/backend , how should I test this? Just tag a prerelease and then delete it?

You can test locally with make release-snapshot.

@Unique-Divine
Copy link
Member Author

Unique-Divine commented Oct 9, 2023

@NibiruChain/backend , how should I test this? Just tag a prerelease and then delete it?

You can test locally with make release-snapshot.

That worked for me. I was on the wrong branch though.

Rerunning from this one with the new changes...

@Unique-Divine Unique-Divine marked this pull request as draft October 9, 2023 22:23
@Unique-Divine
Copy link
Member Author

Just confirmed that this works locally if you use scripts in the hooks.pre block instead of setting an environment variable.

Output from commit 2fc1f03

make release-snapshot

docker run
--rm
--platform linux/amd64
-v "/home/realu/warpath/NibiruChain/nibiru":/go/src/github.com/NibiruChain/nibiru
-w /go/src/github.com/NibiruChain/nibiru
-e CGO_ENABLED=1
-e GITHUB_TOKEN=
goreleaser/goreleaser-cross:v1.19.4
release --rm-dist --snapshot
• starting release...
• loading config file file=.goreleaser.yml
• loading environment variables
• getting and validating git state
• building... commit=365014d0d395dceed51982c11d474a23b997ef61 latest tag=v0.22.0-alpha.1
• pipe skipped reason=disabled during snapshot mode
• took: 1s
• parsing tag
• setting defaults
• snapshotting
• building snapshot... version=0.22.0-alpha.1-SNAPSHOT-365014d0
• checking distribution directory
• --rm-dist is set, cleaning it up
• loading go mod information
• build prerequisites
• writing effective config file
• writing config=dist/config.yaml
• building binaries
• building binary=dist/darwin_darwin_arm64/nibid
• building binary=dist/darwin_darwin_amd64_v1/nibid
• building binary=dist/linux_linux_amd64_v1/nibid
• building binary=dist/linux_linux_arm64/nibid
• running hook hook=bash contrib/scripts/release_pre_darwin.sh
• running hook hook=bash contrib/scripts/release_pre_linux.sh
• running hook hook=bash contrib/scripts/release_pre_darwin.sh
• running hook hook=bash contrib/scripts/release_pre_linux.sh
• overridden build details for darwinarm64 details={ [-s -w -X github.com/cosmos/cosmos-sdk/version.Name=nibiru -X github.com/cosmos/cosmos-sdk/version.AppName=nibid -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }} -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }} -X github.com/cosmos/cosmos-sdk/types.DBBackend=rocksdb -linkmode=external -extldflags '-lrocksdb -lstdc++ -ldl -lz -lbz2'] [netgo osusergo ledger static static_wasm rocksdb grocksdb_no_link] [-mod=readonly -trimpath] [] [] [CC=oa64-clang]}
• overridden build details for linuxarm64 details={ [-s -w -X github.com/cosmos/cosmos-sdk/version.Name=nibiru -X github.com/cosmos/cosmos-sdk/version.AppName=nibid -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }} -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }} -X github.com/cosmos/cosmos-sdk/types.DBBackend=rocksdb -linkmode=external -extldflags '-static -lrocksdb -lstdc++ -lm -ldl -lpthread'] [netgo osusergo ledger muslc rocksdb grocksdb_no_link static] [-mod=readonly -trimpath] [] [] [CC=aarch64-linux-gnu-gcc]}
• took: 8m34s
• universal binaries
• creating from 2 binaries binary=dist/darwin_darwin_all/nibid id=darwin
• archives
• creating archive=dist/nibid_0.22.0-alpha.1-SNAPSHOT-365014d0_darwin_arm64.tar.gz
• creating archive=dist/nibid_0.22.0-alpha.1-SNAPSHOT-365014d0_linux_arm64.tar.gz
• creating archive=dist/nibid_0.22.0-alpha.1-SNAPSHOT-365014d0_darwin_all.tar.gz
• creating archive=dist/nibid_0.22.0-alpha.1-SNAPSHOT-365014d0_darwin_amd64.tar.gz
• creating archive=dist/nibid_0.22.0-alpha.1-SNAPSHOT-365014d0_linux_amd64.tar.gz
• took: 32s
• calculating checksums
• storing release metadata
• writing file=dist/artifacts.json
• writing file=dist/metadata.json
• release succeeded after 9m7s

@Unique-Divine Unique-Divine marked this pull request as ready for review October 9, 2023 22:30
Copy link
Contributor

@helder-moreira helder-moreira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just tested, its working fine.

@Unique-Divine Unique-Divine enabled auto-merge (squash) October 10, 2023 23:03
@Unique-Divine Unique-Divine merged commit 33a8731 into master Oct 10, 2023
8 checks passed
@Unique-Divine Unique-Divine deleted the realu/goreleaser branch October 10, 2023 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants