diff options
Diffstat (limited to 'bump.sh')
-rw-r--r-- | bump.sh | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1,6 +1,6 @@ #!/bin/sh - -# This script bumps the version and updates the git tree accordingly, with tag +# bump the version and update the git tree accordingly +# !!!THIS SCRIPT IS FOR INTERNAL DEVELOPER USE ONLY!!! type -P sed &>/dev/null || { echo "sed command not found. Aborting." >&2; exit 1; } type -P git &>/dev/null || { echo "git command not found. Aborting." >&2; exit 1; } @@ -19,8 +19,11 @@ if [ ! ${TAG:0:3} = 'pbr' ]; then exit 1 fi TAGVER=${TAG:3} +case $TAGVER in *[!0-9]*) + echo "$TAGVER is not a number" + exit 1 +esac OFFSET=10000 -# increment - ideally, we'd check that tagver is really numeric here TAGVER=`expr $TAGVER + 1` TAGVER_OFF=`expr $TAGVER + $OFFSET` echo "Bumping version to pbr$TAGVER (nano: $TAGVER_OFF)" |