From b3de684950cf0d53d987154f1c4f6fe8177bd544 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Mon, 15 Jan 2018 12:52:28 -0700 Subject: [PATCH] Restrict CODEBUILD_GIT_TAG Only set CODEBUILD_GIT_TAG if _this_ commit is the tagged commit. --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 6afa16d..2578fe3 100755 --- a/install +++ b/install @@ -14,7 +14,7 @@ export CODEBUILD_GIT_AUTHOR=`git log -1 --pretty=%an` export CODEBUILD_GIT_AUTHOR_EMAIL=`git log -1 --pretty=%ae` export CODEBUILD_GIT_COMMIT=`git log -1 --pretty=%H` export CODEBUILD_GIT_SHORT_COMMIT=`git log -1 --pretty=%h` -export CODEBUILD_GIT_TAG=`git describe --tags --abbrev=0` +export CODEBUILD_GIT_TAG=`git describe --tags --exact-match 2>/dev/null` export CODEBUILD_PULL_REQUEST=false if [[ $CODEBUILD_GIT_BRANCH == pr-* ]] ; then