From faed0ba9f9ffc892eaad2b7db6a953d37b38f28a Mon Sep 17 00:00:00 2001 From: Sami Alajrami Date: Fri, 23 Feb 2018 15:22:33 +0000 Subject: [PATCH] adding a version timestamp in the circleci build script. --- .circleci/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/build.sh b/.circleci/build.sh index c4d383b4..21832bf2 100755 --- a/.circleci/build.sh +++ b/.circleci/build.sh @@ -8,7 +8,8 @@ go test -v if [ $? -eq 0 ]; then echo "building ..." - go build + TAG=$(git describe --abbrev=0 --tags)-$(date +"%s") + go build -ldflags "-X main.version="$TAG if [ $? -eq 0 ]; then echo "cleaning after tests ..."