#!/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 cp pyproject.toml /tmp/pyproject.toml.1 poetry version ${VERSION} poetry build poetry run twine upload dist/*.whl -u __token__ -p $BITIA_PYPI_TOKEN || echo "Failed to upload" mv /tmp/pyproject.toml.1 pyproject.toml