Skip to content

Commit

Permalink
Fix .goreleaser.yaml and Makefile targets (#8869)
Browse files Browse the repository at this point in the history
  • Loading branch information
niccoloraspa authored Dec 5, 2024
1 parent 765f2b6 commit 1a181bf
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 1a181bf

Please sign in to comment.