Skip to content

Commit

Permalink
fix: adjustment to align with sdk 50 (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmic-vagabond authored Nov 15, 2024
1 parent ab435b9 commit 900edc5
Show file tree
Hide file tree
Showing 7 changed files with 442 additions and 522 deletions.
26 changes: 4 additions & 22 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ builds:
- id: post-upgrade-snapshot-generator-darwin-amd64
main: ./cmd/main.go
binary: post-upgrade-snapshot-generator
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
Expand All @@ -23,20 +20,16 @@ builds:
- -X github.com/elys-network/post-upgrade-snapshot-generator/version.AppName=post-upgrade-snapshot-generator
- -X github.com/elys-network/post-upgrade-snapshot-generator/version.Version=v{{ .Version }}
- -X github.com/elys-network/post-upgrade-snapshot-generator/version.Commit={{ .Commit }}
- -X github.com/elys-network/post-upgrade-snapshot-generator/version.BuildTags=netgo,ledger,static_wasm,pebbledb
- -X github.com/elys-network/post-upgrade-snapshot-generator/version.BuildTags=netgo,ledger,pebbledb
- -w -s
- -linkmode=external
tags:
- netgo
- ledger
- static_wasm
- pebbledb
- id: post-upgrade-snapshot-generator-darwin-arm64
main: ./cmd/main.go
binary: post-upgrade-snapshot-generator
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
Expand All @@ -52,20 +45,16 @@ builds:
- -X github.com/elys-network/post-upgrade-snapshot-generator/version.AppName=post-upgrade-snapshot-generator
- -X github.com/elys-network/post-upgrade-snapshot-generator/version.Version=v{{ .Version }}
- -X github.com/elys-network/post-upgrade-snapshot-generator/version.Commit={{ .Commit }}
- -X github.com/elys-network/post-upgrade-snapshot-generator/version.BuildTags=netgo,ledger,static_wasm,pebbledb
- -X github.com/elys-network/post-upgrade-snapshot-generator/version.BuildTags=netgo,ledger,pebbledb
- -w -s
- -linkmode=external
tags:
- netgo
- ledger
- static_wasm
- pebbledb
- id: post-upgrade-snapshot-generator-linux-amd64
main: ./cmd/main.go
binary: post-upgrade-snapshot-generator
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
goos:
- linux
goarch:
Expand All @@ -80,22 +69,17 @@ builds:
- -X github.com/elys-network/post-upgrade-snapshot-generator/version.AppName=post-upgrade-snapshot-generator
- -X github.com/elys-network/post-upgrade-snapshot-generator/version.Version=v{{ .Version }}
- -X github.com/elys-network/post-upgrade-snapshot-generator/version.Commit={{ .Commit }}
- -X github.com/elys-network/post-upgrade-snapshot-generator/version.BuildTags=netgo,ledger,muslc,osusergo,pebbledb
- -X github.com/elys-network/post-upgrade-snapshot-generator/version.BuildTags=netgo,ledger,osusergo,pebbledb
- -w -s
- -linkmode=external
- -extldflags '-Wl,-z,muldefs -static -lm'
tags:
- netgo
- ledger
- muslc
- osusergo
- pebbledb
- id: post-upgrade-snapshot-generator-linux-arm64
main: ./cmd/main.go
binary: post-upgrade-snapshot-generator
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
goos:
- linux
goarch:
Expand All @@ -110,14 +94,12 @@ builds:
- -X github.com/elys-network/post-upgrade-snapshot-generator/version.AppName=post-upgrade-snapshot-generator
- -X github.com/elys-network/post-upgrade-snapshot-generator/version.Version=v{{ .Version }}
- -X github.com/elys-network/post-upgrade-snapshot-generator/version.Commit={{ .Commit }}
- -X github.com/elys-network/post-upgrade-snapshot-generator/version.BuildTags=netgo,ledger,muslc,osusergo,pebbledb
- -X github.com/elys-network/post-upgrade-snapshot-generator/version.BuildTags=netgo,ledger,osusergo,pebbledb
- -w -s
- -linkmode=external
- -extldflags '-Wl,-z,muldefs -static -lm'
tags:
- netgo
- ledger
- muslc
- osusergo
- pebbledb
universal_binaries:
Expand Down
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,13 @@ help: Makefile
.DEFAULT_GOAL := build

GORELEASER_IMAGE := ghcr.io/goreleaser/goreleaser-cross:v$(GO_VERSION)
COSMWASM_VERSION := $(shell go list -m github.com/CosmWasm/wasmvm | sed 's/.* //')

## release: Build binaries for all platforms and generate checksums
ifdef GITHUB_TOKEN
release:
docker run \
--rm \
-e GITHUB_TOKEN=$(GITHUB_TOKEN) \
-e COSMWASM_VERSION=$(COSMWASM_VERSION) \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/go/src/post-upgrade-snapshot-generator \
-w /go/src/post-upgrade-snapshot-generator \
Expand All @@ -116,7 +114,6 @@ endif
release-dry-run:
docker run \
--rm \
-e COSMWASM_VERSION=$(COSMWASM_VERSION) \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/go/src/post-upgrade-snapshot-generator \
-w /go/src/post-upgrade-snapshot-generator \
Expand All @@ -129,7 +126,6 @@ release-dry-run:
release-snapshot:
docker run \
--rm \
-e COSMWASM_VERSION=$(COSMWASM_VERSION) \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/go/src/post-upgrade-snapshot-generator \
-w /go/src/post-upgrade-snapshot-generator \
Expand Down
Loading

0 comments on commit 900edc5

Please sign in to comment.