update publish scripts
This commit is contained in:
parent
bafb8bc4b7
commit
90ff3fe077
22
publish.sh
22
publish.sh
|
@ -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/*
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue