Skip to content

Commit 4d3ba9c

Browse files
committed
added error checking to release script
1 parent ec34569 commit 4d3ba9c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

RELEASE.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
#!/usr/bin/sh
22

33
#
4-
# Typical version identifier is x.y.z, e.g. 1.0.4
4+
# Acceptable version identifier is x.y.z, e.g. 1.0.4
55
# the version number is then prepended with 'v' for
66
# the tags annotation in git.
77
#
88
VERSION=$1
9+
if [[ "$1" != *"."*"."* ]]; then
10+
echo "Invalid version number"
11+
exit 1
12+
fi
913
if git tag -l | grep -w v$VERSION; then
10-
echo Git tag already exists
14+
echo "Git tag already exists"
1115
exit 1
1216
fi
1317

18+
1419
#
1520
# Clean up any previously attempted archives
1621
#

0 commit comments

Comments
 (0)