22 lines
489 B
Bash
22 lines
489 B
Bash
|
#!/usr/bin/env bash
|
||
|
set -e
|
||
|
|
||
|
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" || exit ; pwd -P )
|
||
|
cd "$parent_path" || exit
|
||
|
|
||
|
if [ 1 -eq "$#" ]
|
||
|
then
|
||
|
echo "Version bump to $1"
|
||
|
sed --in-place --regexp-extended 's/version = "([0-9]*.[0-9].[0-9])"/version = "'"$1"'"/g' pyproject.toml
|
||
|
git add pyproject.toml
|
||
|
git commit -m "Version Bump v$1"
|
||
|
git tag "v$1"
|
||
|
else
|
||
|
echo "No version bump"
|
||
|
fi
|
||
|
git push
|
||
|
git tag --delete latest
|
||
|
git tag latest
|
||
|
git push --delete origin latest
|
||
|
git push --tags
|