Skip to content

Commit

Permalink
add publish to pypi manual script
Browse files Browse the repository at this point in the history
  • Loading branch information
rnag committed Apr 2, 2023
1 parent 20138f6 commit 2c140b6
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions scripts/publish_to_pypi.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
#!/usr/bin/env bash

# Use this script to manually publish to PyPI!
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/*

python setup.py sdist bdist_wheel

python -c 'import pkgutil; exit(0 if pkgutil.find_loader("twine") else 2)' || { echo 'Installing twine...'; pip install --quiet twine; }

while true; do
read -p "Do you want to upload to PyPI (Y/N)? " yn
case $yn in
[Yy]* ) python -m twine upload dist/*; break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done

0 comments on commit 2c140b6

Please sign in to comment.