koel/tag.sh

29 lines
731 B
Bash
Raw Normal View History

#!/usr/bin/env bash
2021-05-05 12:39:35 +00:00
if [[ $(git status --porcelain) ]]; then
echo 'ERROR: Please commit all changes before tagging a new version.'
exit 1
fi
if [ -z "$1" ]; then
echo 'ERROR: You must supply a version number.'
exit 1
fi
TAG=$1
2021-05-05 12:39:35 +00:00
echo "$TAG" > .version
2021-05-21 11:55:49 +00:00
# shellcheck disable=SC2164
cd ./resources/assets
2021-05-05 12:39:35 +00:00
git -c color.ui=always tag "$TAG"
2021-01-10 22:53:09 +00:00
git -c color.ui=always push --tags
cd ../..
2021-01-10 22:53:09 +00:00
git -c color.ui=always add .
git -c color.ui=always commit -m "chore(release): bump version to ${TAG}"
2021-01-10 22:53:09 +00:00
git -c color.ui=always push
2021-05-05 12:39:35 +00:00
git -c color.ui=always tag "$TAG"
2021-01-10 22:53:09 +00:00
git -c color.ui=always tag latest -f
git -c color.ui=always push --tags -f
echo "${TAG} tagged. Now go to https://github.com/koel/koel/releases and finish the draft release."