Skip to content
Snippets Groups Projects
release.sh 414 B
Newer Older
dilawar's avatar
dilawar committed
#!/usr/bin/env bash

set -e

git clean -fxd .
dilawar's avatar
dilawar committed
_version=$(git describe --exact-match --tags HEAD || echo $(poetry version -s).dev$(date +%Y%m%d))
VERSION=${_version#'v'} # remove prefixed 'v' if any
dilawar's avatar
dilawar committed
cp pyproject.toml /tmp/pyproject.toml.1
dilawar's avatar
dilawar committed
poetry version ${VERSION}
poetry build
dilawar's avatar
dilawar committed
python3 -m pip install twine --upgrade
twine upload dist/*.whl -u __token__ -p $BITIA_PYPI_TOKEN
dilawar's avatar
dilawar committed
mv /tmp/pyproject.toml.1 pyproject.toml