Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 48 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,44 @@ builds:
- "{{ .Env.STRIP_FLAGS }}"
- "-linkmode={{ .Env.LINKMODE }}"
- -extldflags "-lc -lrt -lpthread"
- id: akash-linux-amd64-static
binary: akash
main: ./cmd/akash
env:
- CC=x86_64-linux-gnu-gcc
- CXX=x86_64-linux-gnu-g++
goarch:
- amd64
goos:
- linux
flags:
- "-mod={{ .Env.MOD }}"
- "-tags=osusergo,netgo"
- -trimpath
ldflags:
- "{{ .Env.BUILD_VARS }}"
- "{{ .Env.STRIP_FLAGS }}"
- "-linkmode={{ .Env.LINKMODE }}"
- -extldflags "-lc -lrt -lpthread --static"
- id: akash-linux-arm64-static
binary: akash
main: ./cmd/akash
goarch:
- arm64
goos:
- linux
env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
flags:
- "-mod={{ .Env.MOD }}"
- "-tags=osusergo,netgo"
- -trimpath
ldflags:
- "{{ .Env.BUILD_VARS }}"
- "{{ .Env.STRIP_FLAGS }}"
- "-linkmode={{ .Env.LINKMODE }}"
- -extldflags "-lc -lrt -lpthread --static"
universal_binaries:
- id: akash-darwin-universal
ids:
Expand Down Expand Up @@ -114,7 +152,16 @@ archives:
- zip
files:
- none*

- id: static
ids:
- akash-linux-amd64-static
- akash-linux-arm64-static
name_template: "akash_{{ .Os }}_{{ .Arch }}_static"
wrap_in_directory: false
formats:
- zip
files:
- none*
checksum:
# You can change the name of the checksums file.
# Default is `{{ .ProjectName }}_{{ .Version }}_checksums.txt`.
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ IS_STABLE ?= false

GO_LINKMODE ?= external
GOMOD ?= readonly
BUILD_TAGS ?= osusergo,netgo,hidraw,ledger
BUILD_TAGS ?= osusergo,netgo
GORELEASER_STRIP_FLAGS ?=

ifeq ($(IS_MAINNET), true)
Expand All @@ -39,6 +39,10 @@ ifneq (,$(findstring cgotrace,$(BUILD_OPTIONS)))
BUILD_TAGS := $(BUILD_TAGS),cgotrace
endif

ifneq (,$(findstring noledger,$(BUILD_OPTIONS)))
BUILD_TAGS := $(BUILD_TAGS),hidraw,ledger
endif
Comment on lines +42 to +44
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

The conditional logic appears inverted.

The condition adds hidraw and ledger tags when noledger is present in BUILD_OPTIONS. This seems counterintuitive—if noledger is specified, one would expect ledger-related tags to be excluded, not added.

If the intent is to add ledger support by default and only exclude it when noledger is specified, the logic should be inverted:

-ifneq (,$(findstring noledger,$(BUILD_OPTIONS)))
+ifeq (,$(findstring noledger,$(BUILD_OPTIONS)))
 	BUILD_TAGS := $(BUILD_TAGS),hidraw,ledger
 endif

If the current logic is intentional, please add a comment explaining why noledger triggers the addition of ledger tags.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
ifneq (,$(findstring noledger,$(BUILD_OPTIONS)))
BUILD_TAGS := $(BUILD_TAGS),hidraw,ledger
endif
ifeq (,$(findstring noledger,$(BUILD_OPTIONS)))
BUILD_TAGS := $(BUILD_TAGS),hidraw,ledger
endif
🤖 Prompt for AI Agents
In Makefile around lines 42 to 44, the conditional is inverted: it appends
hidraw and ledger tags when BUILD_OPTIONS contains "noledger". Change the
condition so the tags are added only when "noledger" is NOT present (i.e.,
invert the findstring check), or alternatively move the tag addition to the
default path and add a branch that removes or omits those tags when "noledger"
is present; if leaving current behavior, add a clear comment explaining why the
presence of "noledger" must enable ledger tags.


GORELEASER_BUILD_VARS := \
-X github.com/cosmos/cosmos-sdk/version.Name=akash \
-X github.com/cosmos/cosmos-sdk/version.AppName=akash \
Expand Down
2 changes: 1 addition & 1 deletion make/test-upgrade.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ UPGRADE_FROM := $(shell cat $(ROOT_DIR)/meta.json | jq -r --arg name
GENESIS_BINARY_VERSION := $(shell cat $(ROOT_DIR)/meta.json | jq -r --arg name $(UPGRADE_TO) '.upgrades[$$name].from_binary' | tr -d '\n')
UPGRADE_BINARY_VERSION ?= local

SNAPSHOT_SOURCE ?= mainnet
SNAPSHOT_SOURCE ?= sandbox-2

ifeq ($(SNAPSHOT_SOURCE),mainnet)
SNAPSHOT_NETWORK := akashnet-2
Expand Down
Loading