Skip to content

Commit d38c0c9

Browse files
committed
fix: build extra static bins without ledger support
Signed-off-by: Artur Troian <[email protected]>
1 parent 009fab0 commit d38c0c9

File tree

3 files changed

+54
-3
lines changed

3 files changed

+54
-3
lines changed

.goreleaser.yaml

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,44 @@ builds:
8484
- "{{ .Env.STRIP_FLAGS }}"
8585
- "-linkmode={{ .Env.LINKMODE }}"
8686
- -extldflags "-lc -lrt -lpthread"
87+
- id: akash-linux-amd64-static
88+
binary: akash
89+
main: ./cmd/akash
90+
env:
91+
- CC=x86_64-linux-gnu-gcc
92+
- CXX=x86_64-linux-gnu-g++
93+
goarch:
94+
- amd64
95+
goos:
96+
- linux
97+
flags:
98+
- "-mod={{ .Env.MOD }}"
99+
- "-tags=osusergo,netgo"
100+
- -trimpath
101+
ldflags:
102+
- "{{ .Env.BUILD_VARS }}"
103+
- "{{ .Env.STRIP_FLAGS }}"
104+
- "-linkmode={{ .Env.LINKMODE }}"
105+
- -extldflags "-lc -lrt -lpthread --static"
106+
- id: akash-linux-arm64-static
107+
binary: akash
108+
main: ./cmd/akash
109+
goarch:
110+
- arm64
111+
goos:
112+
- linux
113+
env:
114+
- CC=aarch64-linux-gnu-gcc
115+
- CXX=aarch64-linux-gnu-g++
116+
flags:
117+
- "-mod={{ .Env.MOD }}"
118+
- "-tags=osusergo,netgo"
119+
- -trimpath
120+
ldflags:
121+
- "{{ .Env.BUILD_VARS }}"
122+
- "{{ .Env.STRIP_FLAGS }}"
123+
- "-linkmode={{ .Env.LINKMODE }}"
124+
- -extldflags "-lc -lrt -lpthread --static"
87125
universal_binaries:
88126
- id: akash-darwin-universal
89127
ids:
@@ -114,7 +152,16 @@ archives:
114152
- zip
115153
files:
116154
- none*
117-
155+
- id: static
156+
ids:
157+
- akash-linux-amd64-static
158+
- akash-linux-arm64-static
159+
name_template: "akash_{{ .Os }}_{{ .Arch }}_static"
160+
wrap_in_directory: false
161+
formats:
162+
- zip
163+
files:
164+
- none*
118165
checksum:
119166
# You can change the name of the checksums file.
120167
# Default is `{{ .ProjectName }}_{{ .Version }}_checksums.txt`.

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ IS_STABLE ?= false
2626

2727
GO_LINKMODE ?= external
2828
GOMOD ?= readonly
29-
BUILD_TAGS ?= osusergo,netgo,hidraw,ledger
29+
BUILD_TAGS ?= osusergo,netgo
3030
GORELEASER_STRIP_FLAGS ?=
3131

3232
ifeq ($(IS_MAINNET), true)
@@ -39,6 +39,10 @@ ifneq (,$(findstring cgotrace,$(BUILD_OPTIONS)))
3939
BUILD_TAGS := $(BUILD_TAGS),cgotrace
4040
endif
4141

42+
ifneq (,$(findstring noledger,$(BUILD_OPTIONS)))
43+
BUILD_TAGS := $(BUILD_TAGS),hidraw,ledger
44+
endif
45+
4246
GORELEASER_BUILD_VARS := \
4347
-X github.com/cosmos/cosmos-sdk/version.Name=akash \
4448
-X github.com/cosmos/cosmos-sdk/version.AppName=akash \

make/test-upgrade.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ UPGRADE_FROM := $(shell cat $(ROOT_DIR)/meta.json | jq -r --arg name
2121
GENESIS_BINARY_VERSION := $(shell cat $(ROOT_DIR)/meta.json | jq -r --arg name $(UPGRADE_TO) '.upgrades[$$name].from_binary' | tr -d '\n')
2222
UPGRADE_BINARY_VERSION ?= local
2323

24-
SNAPSHOT_SOURCE ?= mainnet
24+
SNAPSHOT_SOURCE ?= sandbox-2
2525

2626
ifeq ($(SNAPSHOT_SOURCE),mainnet)
2727
SNAPSHOT_NETWORK := akashnet-2

0 commit comments

Comments
 (0)