diff --git a/scripts/clean.sh b/scripts/clean.sh new file mode 100755 index 0000000..1123a45 --- /dev/null +++ b/scripts/clean.sh @@ -0,0 +1,7 @@ +./scripts/common.sh + +# Clean +rm -r .tox +rm -r build +rm -r dist +rm -r pyicloud.egg-info diff --git a/scripts/common.sh b/scripts/common.sh new file mode 100755 index 0000000..b61b9de --- /dev/null +++ b/scripts/common.sh @@ -0,0 +1,4 @@ +# Be in right place +if [ ! -f setup.py ]; then + cd .. +fi diff --git a/scripts/publish.sh b/scripts/publish.sh new file mode 100755 index 0000000..780627a --- /dev/null +++ b/scripts/publish.sh @@ -0,0 +1,18 @@ +# Publish the library +# https://pypi.org/project/pyicloud/ +# Publish documentation here: https://packaging.python.org/tutorials/packaging-projects/ + +./scripts/common.sh +./scripts/clean.sh + +# Install/update dependencies +python3 -m pip install --user --upgrade setuptools wheel +python3 -m pip install --user --upgrade twine + +# Build +python3 setup.py sdist bdist_wheel + +# Push to PyPi +python3 -m twine upload dist/* + +# Enter credentials manually :P