Skip to content

Commit

Permalink
fix(simapp/v2): add binary version cmd (#22705)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe authored Dec 2, 2024
1 parent 40430fe commit c207a45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/build/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ LEDGER_ENABLED ?= true
BINDIR ?= $(GOPATH)/bin
BUILDDIR ?= $(CURDIR)/build
SIMAPP = simapp
APPNAME = simd
MOCKS_DIR = $(CURDIR)/tests/mocks
HTTPS_GIT := https://github.com/cosmos/cosmos-sdk.git
DOCKER := $(shell which docker)
Expand Down Expand Up @@ -53,6 +54,7 @@ endif

ifeq (v2,$(findstring v2,$(COSMOS_BUILD_OPTIONS)))
SIMAPP = simapp/v2
APPNAME = simdv2
endif

# DB backend selection
Expand Down Expand Up @@ -86,7 +88,7 @@ build_tags_comma_sep := $(subst $(whitespace),$(comma),$(build_tags))
# process linker flags

ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=sim \
-X github.com/cosmos/cosmos-sdk/version.AppName=simd \
-X github.com/cosmos/cosmos-sdk/version.AppName=$(APPNAME) \
-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=$(build_tags_comma_sep)"
Expand Down
2 changes: 2 additions & 0 deletions simapp/v2/simdv2/cmd/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"github.com/cosmos/cosmos-sdk/client/rpc"
sdktelemetry "github.com/cosmos/cosmos-sdk/telemetry"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/version"
authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli"
"github.com/cosmos/cosmos-sdk/x/genutil"
genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli"
Expand Down Expand Up @@ -65,6 +66,7 @@ func InitRootCmd[T transaction.Tx](
txCommand(),
keys.Commands(),
offchain.OffChain(),
version.NewVersionCommand(),
)

// build CLI skeleton for initial config parsing or a client application invocation
Expand Down

0 comments on commit c207a45

Please sign in to comment.