summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2020-10-16 06:06:42 +0000
committerStan Hu <stanhu@gmail.com>2020-10-16 06:06:42 +0000
commit89a23f1923aa122734e92ddb588f20694959afbf (patch)
treed9df0ab3dfa832f195fa55e1ccc73486615f54cc
parent9010cdccde441d37aff8a1d76f2e701134e42801 (diff)
downloadgitlab-shell-89a23f1923aa122734e92ddb588f20694959afbf.tar.gz
Apply 1 suggestion(s) to 1 file(s)sh-add-version-arg
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 664760f..1c3fd38 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
.PHONY: validate verify verify_ruby verify_golang test test_ruby test_golang coverage coverage_golang setup _install build compile check clean
GO_SOURCES := $(shell find . -name '*.go')
-VERSION_STRING := $(shell git describe --match v* 2>/dev/null || cat VERSION 2>/dev/null || echo unknown)
+VERSION_STRING := $(shell git describe --match v* 2>/dev/null || awk '$0="v"$0' VERSION 2>/dev/null || echo unknown)
BUILD_TIME := $(shell date -u +%Y%m%d.%H%M%S)
GOBUILD_FLAGS := -ldflags "-X main.Version=$(VERSION_STRING) -X main.BuildTime=$(BUILD_TIME)"