release script
This commit is contained in:
parent
396722c143
commit
0c51df220c
1 changed files with 14 additions and 0 deletions
14
scripts/release.sh
Executable file
14
scripts/release.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
if [ -z "$1" ]; then
|
||||
echo "provide a new version, current version is $(jq '.version' package.json)"
|
||||
exit 1
|
||||
fi
|
||||
VERSION=$1
|
||||
git checkout master
|
||||
git pull --rebase origin master
|
||||
jq ".version = \"$VERSION\"" package.json > package.json.tmp
|
||||
rm package.json
|
||||
mv package.json.tmp package.json
|
||||
git add package.json
|
||||
git commit -m "release v$VERSION"
|
||||
git tag "v$VERSION"
|
||||
git push --tags origin master
|
Reference in a new issue