diff --git a/Makefile b/Makefile index 80e016119..354d59f8f 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ GO_TEST_CODECOV ?= BUILD ?= $(shell date +%FT%T%z) GOVERSION ?= $(shell go version | cut -d " " -f3) -COMPONENT_VERSION ?= $(shell git describe --abbrev=0 --always) +COMPONENT_VERSION ?= $(shell git describe --tags --abbrev=0 --always) COMPONENT_BRANCH ?= $(shell git describe --always --contains --all) PMM_RELEASE_FULLCOMMIT ?= $(shell git rev-parse HEAD) GO_BUILD_LDFLAGS = -X main.version=${COMPONENT_VERSION} -X main.buildDate=${BUILD} -X main.commit=${PMM_RELEASE_FULLCOMMIT} -X main.Branch=${COMPONENT_BRANCH} -X main.GoVersion=${GOVERSION} -s -w