From 7c8586b57652e25243bf46577aeb559bad20025a Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Mon, 29 Dec 2014 12:27:42 +0000 Subject: [PATCH] nicer error when there is no version tag --- bin/release | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/release b/bin/release index a39157e5..c0483a9f 100755 --- a/bin/release +++ b/bin/release @@ -10,7 +10,10 @@ RELEASE_DESCRIPTION="Weaving Containers into Applications" setup() { ## Get the new version number from the most recent tag - LATEST_TAG=$(git describe --abbrev=0 --match='v*') + if ! LATEST_TAG=$(git describe --abbrev=0 --match='v*' 2>/dev/null) ; then + echo "Could not find a 'v*' version tag." >&2 + exit 1 + fi LATEST_TAG_SHA=$(git rev-parse $LATEST_TAG) VERSION=${LATEST_TAG#v} # NB does not check that this tag is on master