mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-03 06:37:14 +00:00
UX: version configuration (#5740)
## Description - when not on a tag `tendermint version` will return "unreleased-`branchName`-`commitHash`" Closes: #XXX
This commit is contained in:
@@ -4,7 +4,14 @@ PACKAGES=$(shell go list ./...)
|
||||
BUILDDIR ?= $(CURDIR)/build
|
||||
|
||||
BUILD_TAGS?=tendermint
|
||||
VERSION := $(shell git describe --always)
|
||||
|
||||
# If building a release, please checkout the version tag to get the correct version setting
|
||||
ifneq ($(shell git branch --show-current),)
|
||||
VERSION := unreleased-$(shell git branch --show-current)-$(shell git rev-parse HEAD)
|
||||
else
|
||||
VERSION := $(shell git describe)
|
||||
endif
|
||||
|
||||
LD_FLAGS = -X github.com/tendermint/tendermint/version.TMCoreSemVer=$(VERSION)
|
||||
BUILD_FLAGS = -mod=readonly -ldflags "$(LD_FLAGS)"
|
||||
HTTPS_GIT := https://github.com/tendermint/tendermint.git
|
||||
|
||||
Reference in New Issue
Block a user