From e17f3abe6f675fb671345a04a86bb15b858dd0a7 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 09:17:13 +0100 Subject: [PATCH] fix(simapp/v2): add binary version cmd (backport #22705) (#22708) --- scripts/build/build.mk | 4 +++- simapp/v2/simdv2/cmd/commands.go | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/build/build.mk b/scripts/build/build.mk index f0e1bc7dd0..34e7679504 100644 --- a/scripts/build/build.mk +++ b/scripts/build/build.mk @@ -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)" diff --git a/simapp/v2/simdv2/cmd/commands.go b/simapp/v2/simdv2/cmd/commands.go index 1edd3052ec..9b587e6dc4 100644 --- a/simapp/v2/simdv2/cmd/commands.go +++ b/simapp/v2/simdv2/cmd/commands.go @@ -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