From 1a181bf4002c93c26ca3308cea122ab9407347fb Mon Sep 17 00:00:00 2001 From: Niccolo Raspa <6024049+niccoloraspa@users.noreply.github.com> Date: Thu, 5 Dec 2024 15:31:25 +0100 Subject: [PATCH] Fix .goreleaser.yaml and Makefile targets (#8869) --- .goreleaser.yaml | 81 +++--------------------------------- scripts/makefiles/release.mk | 5 +-- 2 files changed, 7 insertions(+), 79 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index de198301861..54563a5971a 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -6,70 +6,12 @@ env: - CGO_ENABLED=1 builds: - - id: osmosisd-darwin-amd64 - main: ./cmd/osmosisd/main.go - binary: osmosisd - hooks: - pre: - - wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.COSMWASM_VERSION }}/libwasmvmstatic_darwin.a -O /lib/libwasmvmstatic_darwin.a - env: - - CC=o64-clang - - CGO_LDFLAGS=-L/lib - goos: - - darwin - goarch: - - amd64 - flags: - - -mod=readonly - - -trimpath - ldflags: - - -X github.com/cosmos/cosmos-sdk/version.Name=osmosis - - -X github.com/cosmos/cosmos-sdk/version.AppName=osmosisd - - -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }} - - -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }} - - -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,static_wasm - - -w -s - - -linkmode=external - tags: - - netgo - - ledger - - static_wasm - - - id: osmosisd-darwin-arm64 - main: ./cmd/osmosisd/main.go - binary: osmosisd - hooks: - pre: - - wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.COSMWASM_VERSION }}/libwasmvmstatic_darwin.a -O /lib/libwasmvmstatic_darwin.a - env: - - CC=oa64-clang - - CGO_LDFLAGS=-L/lib - goos: - - darwin - goarch: - - arm64 - flags: - - -mod=readonly - - -trimpath - ldflags: - - -X github.com/cosmos/cosmos-sdk/version.Name=osmosis - - -X github.com/cosmos/cosmos-sdk/version.AppName=osmosisd - - -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }} - - -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }} - - -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,static_wasm - - -w -s - - -linkmode=external - tags: - - netgo - - ledger - - static_wasm - - id: osmosisd-linux-amd64 main: ./cmd/osmosisd binary: osmosisd hooks: pre: - - wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.COSMWASM_VERSION }}/libwasmvm_muslc.x86_64.a -O /usr/lib/x86_64-linux-gnu/libwasmvm_muslc.a + - wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.COSMWASM_VERSION }}/libwasmvm_muslc.x86_64.a -O /usr/lib/libwasmvm_muslc.x86_64.a goos: - linux goarch: @@ -87,7 +29,7 @@ builds: - -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,muslc,osusergo - -w -s - -linkmode=external - - -extldflags '-Wl,-z,muldefs -static -lm' + - -extldflags '-L/usr/lib -lwasmvm_muslc.x86_64 -Wl,-z,muldefs -static -lm' tags: - netgo - ledger @@ -99,7 +41,7 @@ builds: binary: osmosisd hooks: pre: - - wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.COSMWASM_VERSION }}/libwasmvm_muslc.aarch64.a -O /usr/lib/aarch64-linux-gnu/libwasmvm_muslc.a + - wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.COSMWASM_VERSION }}/libwasmvm_muslc.aarch64.a -O /usr/lib/libwasmvm_muslc.aarch64.a goos: - linux goarch: @@ -117,39 +59,26 @@ builds: - -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,muslc,osusergo - -w -s - -linkmode=external - - -extldflags '-Wl,-z,muldefs -static -lm' + - -extldflags '-L/usr/lib -lwasmvm_muslc.aarch64 -Wl,-z,muldefs -static -lm' tags: - netgo - ledger - muslc - osusergo -universal_binaries: - - id: osmosisd-darwin-universal - ids: - - osmosisd-darwin-amd64 - - osmosisd-darwin-arm64 - replace: false - archives: - id: zipped builds: - # - osmosisd-darwin-universal - osmosisd-linux-amd64 - osmosisd-linux-arm64 - # - osmosisd-darwin-amd64 - # - osmosisd-darwin-arm64 name_template: "{{.ProjectName}}-{{ .Version }}-{{ .Os }}-{{ .Arch }}" format: tar.gz files: - none* - id: binaries builds: - # - osmosisd-darwin-universal - osmosisd-linux-amd64 - osmosisd-linux-arm64 - # - osmosisd-darwin-amd64 - # - osmosisd-darwin-arm64 name_template: "{{.ProjectName}}-{{ .Version }}-{{ .Os }}-{{ .Arch }}" format: binary files: @@ -227,4 +156,4 @@ release: # announce: # discord: # enabled: true - # message_template: 'New {{.Tag}} is out!' + # message_template: 'New {{.Tag}} is out!' \ No newline at end of file diff --git a/scripts/makefiles/release.mk b/scripts/makefiles/release.mk index b70ee1a7122..d2359c6e8ff 100644 --- a/scripts/makefiles/release.mk +++ b/scripts/makefiles/release.mk @@ -24,7 +24,7 @@ release-dry-run: $(GORELEASER_IMAGE) \ release \ --clean \ - --skip-publish + --skip=publish release-snapshot: docker run \ @@ -37,5 +37,4 @@ release-snapshot: release \ --clean \ --snapshot \ - --skip-validate \ - --skip-publish + --skip=publish,validate