versionCommit.sh
1 #!/bin/bash 2 set -euo pipefail 3 4 if [ -z "${1:-}" ] 5 then 6 echo "Error: bump type is required. Usage: $0 [major|minor|patch|prerelease]" 7 exit 1 8 fi 9 10 # Bump the version in lerna.json 11 node ./bumpVersion.js $1 12 13 14 NEW_VERSION=$(node -p "require('../lerna.json').version") 15 git add ../lerna.json 16 git commit -m "Bump version to $NEW_VERSION" 17 git tag $NEW_VERSION 18 git push 19 git push --tags