Skip to content

Commit cd4cf14

Browse files
author
Christoph Hegemann
authored
chore: checks the format of the version number to be released (#379)
1 parent a994f34 commit cd4cf14

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dev/bump-version

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ git rev-parse --abbrev-ref HEAD | grep -q main
88
git diff-index --quiet HEAD --
99

1010
NEW_VERSION="$1"
11+
if ! [[ "$NEW_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
12+
echo "You need to specify a version number in the format X.Y.Z"
13+
exit 1
14+
fi
1115

1216
echo "Updating package.json."
1317
yarn version --no-git-tag-version --new-version "$NEW_VERSION"

0 commit comments

Comments
 (0)