Makefile: add shushtar prefix to commit version

The version string on boot up displays the lnd version hard coded in
lnd/build/version.go but the commit of shushtar (currently
v0.1.0-alpa.rcX). This could be confusing to users, why the second
version is completely different. I added the prefix "shushtar-" to the
commit to make it clear it is referencing the shushtar repo.

We also fix the Makefile to properly compile in the commit hash.
This commit is contained in:
Oliver Gugger 2020-06-18 09:57:29 +02:00
parent b09f0f8aed
commit d73632ab70
No known key found for this signature in database
GPG key ID: 8E4256593F177720

View file

@ -14,6 +14,7 @@ GOACC_BIN := $(GO_BIN)/go-acc
STATIK_BIN := $(GO_BIN)/statik
COMMIT := $(shell git describe --abbrev=40 --dirty --tags)
COMMIT_HASH := $(shell git rev-parse HEAD)
LINT_COMMIT := v1.18.0
GOACC_COMMIT := ddc355013f90fea78d83d3a6c71f1d37ac07ecd5
@ -40,7 +41,7 @@ include make/release_flags.mk
# We only return the part inside the double quote here to avoid escape issues
# when calling the external release script. The second parameter can be used to
# add additional ldflags if needed (currently only used for the release).
make_ldflags = $(2) -X $(LND_PKG)/build.Commit=$(COMMIT) \
make_ldflags = $(2) -X $(LND_PKG)/build.Commit=shushtar-$(COMMIT) \
-X $(LND_PKG)/build.CommitHash=$(COMMIT_HASH) \
-X $(LND_PKG)/build.GoVersion=$(GOVERSION) \
-X $(LND_PKG)/build.RawTags=$(shell echo $(1) | sed -e 's/ /,/g')