mirror of
https://github.com/koel/koel
synced 2024-11-10 14:44:13 +00:00
28 lines
731 B
Bash
Executable file
28 lines
731 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
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
|
|
echo "$TAG" > .version
|
|
# shellcheck disable=SC2164
|
|
cd ./resources/assets
|
|
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 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."
|