budibase/scripts/versionCommit.sh

18 lines
356 B
Bash
Raw Permalink Normal View History

2023-04-21 15:11:21 +02:00
#!/bin/bash
if [ -z "$1" ]
then
2023-06-06 09:11:30 +02:00
echo "Error: bump type 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
2023-06-26 12:53:29 +02:00
node ./bumpVersion.js $1
2023-04-21 15:11:21 +02:00
2023-04-21 17:45:36 +02:00
2023-06-26 12:53:29 +02:00
NEW_VERSION=$(node -p "require('../lerna.json').version")
2023-06-27 18:02:51 +02:00
git add ../lerna.json
2023-04-21 15:11:21 +02:00
git commit -m "Bump version to $NEW_VERSION"
2023-07-19 15:57:48 +02:00
git tag $NEW_VERSION
2023-04-21 15:11:21 +02:00
git push
2023-04-21 17:45:36 +02:00
git push --tags