Skip to content

Commit

Permalink
Fix .goreleaser.yaml and Makefile targets (#8869) (#8870)
Browse files Browse the repository at this point in the history
(cherry picked from commit 1a181bf)

Co-authored-by: Niccolo Raspa <[email protected]>
  • Loading branch information
mergify[bot] and niccoloraspa authored Dec 5, 2024
1 parent fed374b commit 39ec8f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 79 deletions.
81 changes: 5 additions & 76 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -227,4 +156,4 @@ release:
# announce:
# discord:
# enabled: true
# message_template: 'New {{.Tag}} is out!'
# message_template: 'New {{.Tag}} is out!'
5 changes: 2 additions & 3 deletions scripts/makefiles/release.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ release-dry-run:
$(GORELEASER_IMAGE) \
release \
--clean \
--skip-publish
--skip=publish

release-snapshot:
docker run \
Expand All @@ -37,5 +37,4 @@ release-snapshot:
release \
--clean \
--snapshot \
--skip-validate \
--skip-publish
--skip=publish,validate

0 comments on commit 39ec8f9

Please sign in to comment.