2023-04-21 15:11:21 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ -z "$1" ]
|
|
|
|
then
|
2023-05-05 14:23:14 +02:00
|
|
|
echo "Error: version number is required. Usage: $0 [major|minor|patch|prerelease]"
|
2023-04-21 15:11:21 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Bump the version in lerna.json
|
|
|
|
node scripts/bumpVersion.js $1
|
|
|
|
|
2023-04-21 17:45:36 +02:00
|
|
|
|
|
|
|
NEW_VERSION=$(node -p "require('./lerna.json').version")
|
2023-04-21 15:11:21 +02:00
|
|
|
git add lerna.json
|
|
|
|
git commit -m "Bump version to $NEW_VERSION"
|
|
|
|
git tag v$NEW_VERSION
|
|
|
|
git push
|
2023-04-21 17:45:36 +02:00
|
|
|
git push --tags
|