diff --git a/Makefile b/Makefile index 034c71c23b6a1cae37aa19c9cc72a42001a51fd9..1873da33e04417df15847d89303a943ea78c3176 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ GO_JUNIT_REPORT := ${BUILD_DIR}/bin/go-junit-report BUNDLE_FLAGS ?= $(shell test -f ${SOURCE_DIR}/../.gdk-install-root && echo --no-deployment || echo --deployment) GITALY_PACKAGE := gitlab.com/gitlab-org/gitaly BUILD_TIME := $(shell date +"%Y%m%d.%H%M%S") -GITALY_VERSION := $(shell git describe --match v* 2>/dev/null | sed 's/^v//' || cat ${SOURCE_DIR}/VERSION 2>/dev/null || echo unknown) +GITALY_VERSION := $(shell git describe --tags --exact-match --match v* 2>/dev/null | sed 's/^v//' || cat ${SOURCE_DIR}/VERSION 2>/dev/null || echo unknown) GO_LDFLAGS := -ldflags '-X ${GITALY_PACKAGE}/internal/version.version=${GITALY_VERSION} -X ${GITALY_PACKAGE}/internal/version.buildtime=${BUILD_TIME}' GO_TEST_LDFLAGS := -X gitlab.com/gitlab-org/gitaly/auth.timestampThreshold=5s GO_BUILD_TAGS := tracer_static,tracer_static_jaeger,continuous_profiler_stackdriver,static,system_libgit2