Skip to content

Commit

Permalink
allow preleleases in release.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
strowk committed Dec 20, 2024
1 parent 25f8ace commit 2f20d0f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tools/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@ fi
# drop the v prefix
new_version="${new_version#v}"

# check that new version is X.Y.Z
if [[ ! $new_version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Version should be in format X.Y.Z where X, Y, Z are numbers"
# check that new version is X.Y.Z or X.Y.Z-beta.N
if ! echo "$new_version" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+(-beta\.[0-9]+)?$' > /dev/null; then
echo "Version should be in format X.Y.Z where X, Y, Z are numbers, or X.Y.Z-beta.N"
exit 1
fi

packages/update_versions.sh $new_version
git add ./packages
git commit -m "chore: update npm packages versions to $new_version"
git push
git commit -m "chore: update npm packages versions to $new_version" && git push || true

git tag -a "v$new_version" -m "release v$new_version"
git push origin "v$new_version"
Expand Down

0 comments on commit 2f20d0f

Please sign in to comment.