Push commit & tag and check branch in release script

This commit is contained in:
ChillerDragon 2023-03-16 16:59:59 +01:00
parent fa0751790e
commit 54f0f8cb7c

View file

@ -17,6 +17,12 @@ then
exit 1
fi
if [ "$(git rev-parse --abbrev-ref HEAD)" != "master" ]
then
echo "Error: can only release from master branch"
exit 1
fi
echo "This script will create a git tag, git commit and a pypi release"
echo "Do you really want to run that? [y/N]"
read -r -n1 yn
@ -199,5 +205,12 @@ then
exit 1
fi
python -m twine upload -u __token__ -p "$pypi_token" dist/*
if ! python -m twine upload -u __token__ -p "$pypi_token" dist/*
then
echo "Error: upload to pypi failed"
exit 1
fi
git push origin master
git push origin "$tag_name"