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

set -e

_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
poetry run twine upload dist/*.whl -u __token__ -p $BITIA_PYPI_TOKEN || echo "Failed to upload"
dilawar's avatar
dilawar committed
mv /tmp/pyproject.toml.1 pyproject.toml