mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-21 06:19:38 +08:00
10 lines
377 B
Bash
10 lines
377 B
Bash
|
#!/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
|