carrot/teleoprtc_repo/scripts/publish_pypi.sh
FrogAi 659adb6457 openpilot v0.9.7 release
date: 2024-03-17T10:14:38
master commit: 7e9a909e0e57ecb31df4c87c5b9a06b1204fd034
2024-05-24 17:43:27 -07:00

24 lines
410 B
Bash

#!/usr/bin/env bash
set -e
if [[ -z "$1" ]]; then
echo "Usage: $0 <PyPI token>"
exit 1
fi
PYPI_TOKEN="$1"
# install required packages
pip install --upgrade twine build
# build the package
python3 -m build
# upload to PyPI
REPOSITORY=""
if [[ -n "$TEST_UPLOAD" ]]; then
REPOSITORY="--repository testpypi"
fi
python3 -m twine upload $REPOSITORY --username __token__ --password "$PYPI_TOKEN" dist/*