update publish scripts

This commit is contained in:
S Groesz 2021-04-14 02:57:57 +00:00
parent bafb8bc4b7
commit 90ff3fe077
2 changed files with 22 additions and 2 deletions

View File

@ -1,2 +1,2 @@
#!/bin/sh -
python3 setup.py sdist bdist_wheel
python3 -m build

View File

@ -58,7 +58,27 @@ if [ "$(echo "$PTYPE" | grep -E '(pypi|test)')" = "" ]; then
exit 1
fi
# Set the token
_TOKEN=$test_token # Default
_REPO="testpypi"
if [ "$(echo "$PTYPE" | grep -E '(pypi)')" = "pypi" ]; then
_TOKEN=$pypi_token
_REPO="pypi"
echo "Publishing to PYPI official..."
fi
# Upgrade pip packages
python3 -m pip install pip --upgrade
python3 -m pip install setuptools --upgrade
python3 -m pip install wheel --upgrade
python3 -m pip install twine --upgrade
python3 -m pip install build --upgrade
# build current version
# note: mkae sure to update setup.py first
python3 -m build
# command: python3 -m twine upload --username $_USERNAME --password $_TOKEN --non-interactive --repository $_REPO dist/*
python3 -m twine upload --username $_USERNAME --password $_TOKEN --non-interactive --repository $_REPO dist/*
python3 -m twine upload --verbose --username $_USERNAME --password $_TOKEN --non-interactive --repository $_REPO dist/*