From 6aa2edd2b5c463d8475d477099460c8a64694efc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Mon, 7 May 2018 14:46:19 +0200 Subject: [PATCH] just use HEAD when tagging --- build_no.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build_no.sh b/build_no.sh index 8e56103163..7e0dfe99e8 100755 --- a/build_no.sh +++ b/build_no.sh @@ -25,7 +25,7 @@ getNumber () { REGEX='^build-[0-9]\+$' # check if current commit has a build tag -BUILD=$(git tag --points-at refs/tags/HEAD | grep -e "$REGEX") +BUILD=$(git tag --points-at HEAD | grep -e "$REGEX") # chech for multiple lines if [ 1 -lt $(echo "$BUILD" | grep -c -) ]; then @@ -49,9 +49,9 @@ BUILD_NO=$(getNumber "$BUILD") BUILD_NO="$((BUILD_NO+1))" if [ "$1" = "--tag" ]; then - echo "Tagging refs/tags/HEAD: $BUILD" >&2 + echo "Tagging HEAD: $BUILD" >&2 echo "You will need to 'git push --tags' to make this tag take effect." >&2 - git tag "build-$BUILD_NO" refs/tags/HEAD + git tag "build-$BUILD_NO" HEAD fi # finally print build number