2023-04-22 01:11:21 +12:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ -z "$1" ]
|
|
|
|
then
|
2023-06-06 19:11:30 +12:00
|
|
|
echo "Error: bump type is required. Usage: $0 [major|minor|patch|prerelease]"
|
2023-04-22 01:11:21 +12:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Bump the version in lerna.json
|
2023-06-26 22:53:29 +12:00
|
|
|
node ./bumpVersion.js $1
|
2023-04-22 01:11:21 +12:00
|
|
|
|
2023-04-22 03:45:36 +12:00
|
|
|
|
2023-06-26 22:53:29 +12:00
|
|
|
NEW_VERSION=$(node -p "require('../lerna.json').version")
|
2023-06-28 04:02:51 +12:00
|
|
|
git add ../lerna.json
|
2023-04-22 01:11:21 +12:00
|
|
|
git commit -m "Bump version to $NEW_VERSION"
|
|
|
|
git tag v$NEW_VERSION
|
|
|
|
git push
|
2023-04-22 03:45:36 +12:00
|
|
|
git push --tags
|