Skip to content

Commit

Permalink
Check if version exists
Browse files Browse the repository at this point in the history
  • Loading branch information
timdp committed Apr 28, 2018
1 parent 8ebcb78 commit bc7baaa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@ set -e

ver="v$1"

if git rev-parse $ver >/dev/null 2>&1; then
echo Error: tag $ver already exists >&2
exit 1
fi

git commit --allow-empty -m "$ver"
git tag -a "$ver" -m "$ver"

0 comments on commit bc7baaa

Please sign in to comment.