From 042ce4755886b7e6f628e0d7f38cf220279de485 Mon Sep 17 00:00:00 2001 From: James Fargher Date: Fri, 28 Aug 2020 10:35:24 +1200 Subject: [PATCH] Allow lightweight release tags --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 034c71c23b..1873da33e0 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 -- GitLab