From a668da1a1b919da44c05531bbd7201a0d6038509 Mon Sep 17 00:00:00 2001 From: Quentame Date: Sun, 22 Mar 2020 20:07:29 +0100 Subject: [PATCH] Add clean + publish scripts (#255) --- scripts/clean.sh | 7 +++++++ scripts/common.sh | 4 ++++ scripts/publish.sh | 18 ++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100755 scripts/clean.sh create mode 100755 scripts/common.sh create mode 100755 scripts/publish.sh 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