chore: add some script improvements

This commit is contained in:
Phan An 2021-05-05 14:39:35 +02:00
parent 8215da008d
commit 8e100a2a2e
No known key found for this signature in database
GPG key ID: A81E4477F0BB6FDC

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
if [[ `git status --porcelain` ]]; then
if [[ $(git status --porcelain) ]]; then
echo 'ERROR: Please commit all changes before tagging a new version.'
exit 1
fi
@ -13,16 +13,16 @@ fi
cd ..
TAG=$1
echo $TAG > .version
cd ./resources/assets
git -c color.ui=always tag $TAG
echo "$TAG" > .version
cd ./resources/assets || exit
git -c color.ui=always tag "$TAG"
git -c color.ui=always push --tags
cd ../..
git -c color.ui=always add .
git -c color.ui=always commit -m "chore(release): bump version to ${TAG}"
git -c color.ui=always push
git -c color.ui=always tag $TAG
git -c color.ui=always tag "$TAG"
git -c color.ui=always tag latest -f
git -c color.ui=always push --tags -f