From 6fcd8a8dbdb290a045e7d54b84e59df425859837 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Thu, 27 Dec 2018 21:36:50 +0000 Subject: [PATCH] Fix incorrect check --- contrib/semver/version.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/semver/version.sh b/contrib/semver/version.sh index ca035ff5..7d4f3736 100644 --- a/contrib/semver/version.sh +++ b/contrib/semver/version.sh @@ -5,7 +5,7 @@ TAG=$(git describe --abbrev=0 --tags --match="v[0-9]*\.[0-9]*\.[0-9]*" 2>/dev/nu # Did getting the tag succeed? if [ $? != 0 ] || [ -z "$TAG" ]; then - printf "unknown" + printf -- "unknown" exit 1 fi @@ -34,7 +34,8 @@ if [ "$BRANCH" != "master" ]; then BUILD=$(git rev-list $TAG..HEAD --count 2>/dev/null) # Did getting the count of commits since the tag succeed? - if [ $? != 0 ] && [ -z "$BUILD" ]; then + if [ $? != 0 ] || [ -z "$BUILD" ]; then + printf -- "-unknown" exit 1 fi