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

Add goreleaser to ICS repo #1035

Closed
Tracked by #1039
shaspitz opened this issue Jun 19, 2023 · 1 comment
Closed
Tracked by #1039

Add goreleaser to ICS repo #1035

shaspitz opened this issue Jun 19, 2023 · 1 comment
Labels
S: Productivity Productivity: Developer tooling, infrastructure improvements enabling future growth

Comments

@shaspitz
Copy link
Contributor

Problem

It'd be useful for Hypha if we could populate the following fields for the version CLI command

./interchain-security-cd version --long
name: ""
server_name: <appd>
version: "" <- getting a "v2.0.0-rc3" here would be great
commit: ""  <- getting this one populated would work too
build_tags: ""
go: go version go1.20.5 linux/amd64

Closing criteria

Implementing goreleaser for this repo could solve the issue. See cosmos/gaia#2549 for gaia

Problem details

@shaspitz shaspitz added the status: waiting-triage This issue/PR has not yet been triaged by the team. label Jun 19, 2023
@github-project-automation github-project-automation bot moved this to 🩹 Triage in Cosmos Hub Jun 19, 2023
@mpoke mpoke changed the title Consider implementing goreleaser Add goreleaser to ICS repo Jun 20, 2023
@mpoke mpoke removed the status: waiting-triage This issue/PR has not yet been triaged by the team. label Jun 20, 2023
@mpoke mpoke moved this from 🩹 Triage to 📥 Todo in Cosmos Hub Jun 20, 2023
@mpoke mpoke added the S: Productivity Productivity: Developer tooling, infrastructure improvements enabling future growth label Sep 13, 2023
@mpoke mpoke mentioned this issue Sep 19, 2023
18 tasks
@MSalopek MSalopek removed their assignment Apr 29, 2024
@MSalopek
Copy link
Contributor

MSalopek commented Apr 29, 2024

The point of the issue was solved by different means. There's not much goreleaser would help with.

Instead of adding goreleaser we added buildtags to the Makefile.

# Makefile
sharedFlags = -X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
		  -X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT)

providerFlags := $(sharedFlags) -X github.com/cosmos/cosmos-sdk/version.AppName=interchain-security-pd -X github.com/cosmos/cosmos-sdk/version.Name=interchain-security-pd
consumerFlags := $(sharedFlags) -X github.com/cosmos/cosmos-sdk/version.AppName=interchain-security-cd -X github.com/cosmos/cosmos-sdk/version.Name=interchain-security-cd
democracyFlags := $(sharedFlags) -X github.com/cosmos/cosmos-sdk/version.AppName=interchain-security-cdd -X github.com/cosmos/cosmos-sdk/version.Name=interchain-security-cdd
standaloneFlags := $(sharedFlags) -X github.com/cosmos/cosmos-sdk/version.AppName=interchain-security-sd -X github.com/cosmos/cosmos-sdk/version.Name=interchain-security-sd

install: go.sum
		export GOFLAGS='-buildmode=pie'
		export CGO_CPPFLAGS="-D_FORTIFY_SOURCE=2"
		export CGO_LDFLAGS="-Wl,-z,relro,-z,now -fstack-protector"
		go install -ldflags "$(providerFlags)" ./cmd/interchain-security-pd
		go install -ldflags "$(consumerFlags)" ./cmd/interchain-security-cd
		go install -ldflags "$(democracyFlags)" ./cmd/interchain-security-cdd
		go install -ldflags "$(standaloneFlags)" ./cmd/interchain-security-sd

Now you can do:

interchain-security-pd version
# v4.1.0
# or main-<commithash>

@github-project-automation github-project-automation bot moved this from 📥 F2: Todo to 👍 F4: Assessment in Cosmos Hub Apr 29, 2024
@mpoke mpoke moved this from 👍 F4: Assessment to ✅ Done in Cosmos Hub May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: Productivity Productivity: Developer tooling, infrastructure improvements enabling future growth
Projects
Status: ✅ Done
Development

No branches or pull requests

3 participants