fix(simapp/v2): add binary version cmd (backport #22705) (#22708)

This commit is contained in:
mergify[bot] 2024-12-02 09:17:13 +01:00 committed by GitHub
parent 6d4992bc3e
commit e17f3abe6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -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)
@ -53,6 +54,7 @@ endif
ifeq (v2,$(findstring v2,$(COSMOS_BUILD_OPTIONS)))
SIMAPP = simapp/v2
APPNAME = simdv2
endif
# DB backend selection
@ -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)"

View File

@ -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"
@ -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