blessing-skin-server/scripts/version.sh

10 lines
377 B
Bash
Raw Normal View History

2019-04-20 16:02:05 +08:00
#!/bin/bash
set -e
CURRENT=$(cat package.json | grep -P '\d+\.\d+\.\d+' -o | head -n 1)
NEW_VERSION=$(./node_modules/.bin/semver -i $1 $CURRENT)
sed -i "0,/$CURRENT/s/$CURRENT/$NEW_VERSION/" package.json config/app.php
git add package.json config/app.php
git commit -m "Bump version to $NEW_VERSION"
git tag -a $NEW_VERSION -m $NEW_VERSION
git push --follow-tags origin master