Skip to content

Commit 51d4644

Browse files
committed
simplify
1 parent c4d686d commit 51d4644

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

scripts/publish_prod.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,8 @@ CURRENT_VERSION=$(node -pe "require('./package.json').version")
4646
if [ -z "$1" ]; then
4747
echo "Must specify a desired version number"
4848
exit 1
49-
elif [[ $1 == v* ]]; then
50-
echo "Version should not start with 'v', e.g., use 3.1.4 instead of v3.1.4"
51-
exit 1
52-
elif [[ ! $1 =~ [0-9]+\.[0-9]+\.[0-9]+ ]]; then
53-
echo "Must use a semantic version, e.g., 3.1.4"
49+
elif [[ ! $1 =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
50+
echo "Must use a semantic version, e.g., 3.1.4 (note the lack of any \`v\` prefix)"
5451
exit 1
5552
else
5653
VERSION=$1

0 commit comments

Comments
 (0)