added script to bump versions for release (#2239)

So cool
This commit is contained in:
wheatley
2021-12-03 10:04:18 +10:00
committed by GitHub
parent 9181c83a87
commit 0b41775618

16
scripts/bump-version.sh Normal file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
git checkout -b "release/$2"
sed -i '' -e "s/$1/$2/g" VERSION
sed -i '' -e "s/\"version\": \"$1\"/\"version\": \"$2\"/g" package.json
sed -i '' -e "s/\"version\": \"$1\"/\"version\": \"$2\"/g" package-lock.json
sed -i '' -e "s/\"version\": \"$1\"/\"version\": \"$2\"/g" config.yaml
if [[ "$1" != *"-pre"* ]]; then
sed -i '' -e "s/v$1/v$2/g" .github/ISSUE_TEMPLATE.md
fi
git add VERSION package.json package-lock.json config.yaml
git commit -m "Version bump $2"
git push --set-upstream origin release/$2
git push