diff --git a/dev/bump-version b/dev/bump-version index 601f7401..f34b7b5f 100755 --- a/dev/bump-version +++ b/dev/bump-version @@ -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"