budibase/scripts/bumpLernaVersion.sh

16 lines
460 B
Bash
Raw Normal View History

2023-04-20 15:09:37 +02:00
#!/bin/bash
# Bump the version in lerna.json
CURRENT_VERSION=$(node -p "require('./lerna.json').version")
NEW_VERSION=$(echo $CURRENT_VERSION | awk -F. -v OFS=. '{++$NF; print}')
sed -i '' "s/\"version\": \"$CURRENT_VERSION\"/\"version\": \"$NEW_VERSION\"/" lerna.json
lerna version prerelease --no-git-tag-version --force-publish --no-push --y
git add lerna.json
git commit -m "Bump version to $NEW_VERSION"
2023-04-20 16:31:31 +02:00
git tag v$NEW_VERSION
2023-04-20 15:09:37 +02:00
git push
git push --tags