* version: revert version through ldflag only (#6494)

Add version back to versions, but allow it to be overridden via a ldflag.

Reason:

Many users are not setting the ldflag causing issues with tooling that relies on it (cosmjs)

closes #6488

cc @webmaster128

* revert variable rename

* Update CHANGELOG_PENDING.md
This commit is contained in:
Marko
2021-05-31 21:15:12 +00:00
committed by GitHub
parent 8dd8a4e8ea
commit c376b44f1c
6 changed files with 17 additions and 7 deletions

View File

@@ -2,7 +2,14 @@ PACKAGES=$(shell go list ./...)
OUTPUT?=build/tendermint
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 symbolic-ref -q --short HEAD),)
VERSION := unreleased-$(shell git symbolic-ref -q --short HEAD)-$(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