From 6d2fcc5d4eecbb9eca8d9867b628602948270036 Mon Sep 17 00:00:00 2001 From: zakir <80246097+zakir-code@users.noreply.github.com> Date: Fri, 24 May 2024 17:42:32 +0800 Subject: [PATCH] chore: improve fxcored version cmd (cherry picked from commit 0a03d2f25ea8bd726bb89df03433ac8ac973ff8a) chore: fix tendermint version (cherry picked from commit b7684eada14d33a999ea33e9fda613a805ec1e5f) (cherry picked from commit 24282629ad84fa85d6fa0779456413f6016d688b) --- .goreleaser.yml | 5 ++++- Makefile | 18 ++---------------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 5812b0458..ca2e5273a 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -106,4 +106,7 @@ changelog: - '^docs:' - '^test:' snapshot: - name_template: "{{ .Tag }}-next" \ No newline at end of file + name_template: "{{ .Tag }}-next" + +release: + draft: true \ No newline at end of file diff --git a/Makefile b/Makefile index 419c37ed0..221f84cca 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,7 @@ #!/usr/bin/make -f -BRANCH := $(shell git rev-parse --abbrev-ref HEAD) -COMMIT := $(shell git log -1 --format='%H') - -# don't override user values -ifeq (,$(VERSION)) - ifeq ($(OS),Windows_NT) - VERSION := $(shell git describe --exact-match 2>$null) - else - VERSION := $(shell git describe --exact-match 2>/dev/null) - endif - # if VERSION is empty, then populate it with branch's name and raw commit hash - ifeq (,$(VERSION)) - VERSION := $(BRANCH)-$(COMMIT) - endif -endif +VERSION := $(shell git describe --tags --always 2>/dev/null || echo 'unknown') +COMMIT := $(shell git log -1 --format='%H' 2>/dev/null || echo 'unknown') LEDGER_ENABLED ?= true BUILDDIR ?= $(CURDIR)/build @@ -71,7 +58,6 @@ BUILD_TAGS_COMMA_SEP := $(subst $(whitespace),$(comma),$(build_tags)) ldflags = -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)" \ - -X github.com/tendermint/tendermint/version.TMCoreSemVer=$(VERSION) \ -X github.com/cosmos/cosmos-sdk/version.Name=fxcore \ -X github.com/cosmos/cosmos-sdk/version.AppName=fxcored \