2021-01-10 23:48:54 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2021-05-05 14:39:35 +02:00
|
|
|
if [[ $(git status --porcelain) ]]; then
|
2021-01-10 23:48:54 +01:00
|
|
|
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 14:39:35 +02:00
|
|
|
echo "$TAG" > .version
|
2021-05-21 13:55:49 +02:00
|
|
|
# shellcheck disable=SC2164
|
|
|
|
cd ./resources/assets
|
2021-05-05 14:39:35 +02:00
|
|
|
git -c color.ui=always tag "$TAG"
|
2021-01-10 23:53:09 +01:00
|
|
|
git -c color.ui=always push --tags
|
2021-01-10 23:48:54 +01:00
|
|
|
|
|
|
|
cd ../..
|
2021-01-10 23:53:09 +01:00
|
|
|
git -c color.ui=always add .
|
2021-04-16 12:07:43 +02:00
|
|
|
git -c color.ui=always commit -m "chore(release): bump version to ${TAG}"
|
2021-01-10 23:53:09 +01:00
|
|
|
git -c color.ui=always push
|
2021-05-05 14:39:35 +02:00
|
|
|
git -c color.ui=always tag "$TAG"
|
2021-01-10 23:53:09 +01:00
|
|
|
git -c color.ui=always tag latest -f
|
|
|
|
git -c color.ui=always push --tags -f
|
2021-04-16 12:07:43 +02:00
|
|
|
|
|
|
|
echo "${TAG} tagged. Now go to https://github.com/koel/koel/releases and finish the draft release."
|