Skip to content

Commit

Permalink
chore: checks the format of the version number to be released (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
kritzcreek authored Oct 2, 2024
1 parent a994f34 commit cd4cf14
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dev/bump-version
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ git rev-parse --abbrev-ref HEAD | grep -q main
git diff-index --quiet HEAD --

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

echo "Updating package.json."
yarn version --no-git-tag-version --new-version "$NEW_VERSION"
Expand Down

0 comments on commit cd4cf14

Please sign in to comment.