diff --git a/docs/development.rst b/docs/development.rst index d1753f342..a20b61c05 100644 --- a/docs/development.rst +++ b/docs/development.rst @@ -333,9 +333,11 @@ Checklist: do a fresh start based on that. - run tox and/or binary builds on all supported platforms via vagrant, check for test failures -- create a release on PyPi:: +- create sdist, sign it, upload release to (test) PyPi:: - python setup.py register sdist upload --identity="Thomas Waldmann" --sign + scripts/sdist-sign X.Y.Z + scripts/upload-pypi X.Y.Z test + scripts/upload-pypi X.Y.Z - close the release milestone on GitHub - announce on: diff --git a/requirements.d/development.txt b/requirements.d/development.txt index 88535435a..66262e2f1 100644 --- a/requirements.d/development.txt +++ b/requirements.d/development.txt @@ -8,3 +8,4 @@ pytest-xdist pytest-cov pytest-benchmark Cython!=0.27 +twine diff --git a/scripts/release b/scripts/release deleted file mode 100755 index a67a77560..000000000 --- a/scripts/release +++ /dev/null @@ -1,2 +0,0 @@ -python setup.py register sdist upload --identity="Thomas Waldmann" --sign - diff --git a/scripts/sdist-sign b/scripts/sdist-sign new file mode 100755 index 000000000..50758a30a --- /dev/null +++ b/scripts/sdist-sign @@ -0,0 +1,20 @@ +#!/bin/bash + +R=$1 + +if [ "$R" = "" ]; then + echo "Usage: sdist-sign 1.2.3" + exit +fi + +if [ "$QUBES_GPG_DOMAIN" = "" ]; then + GPG=gpg +else + GPG=qubes-gpg-client-wrapper +fi + +python setup.py sdist + +D=dist/borgbackup-$R.tar.gz + +$GPG --detach-sign --local-user "Thomas Waldmann" --armor --output $D.asc $D diff --git a/scripts/upload-pypi b/scripts/upload-pypi new file mode 100755 index 000000000..db0ef45f3 --- /dev/null +++ b/scripts/upload-pypi @@ -0,0 +1,18 @@ +#!/bin/bash + +R=$1 + +if [ "$R" = "" ]; then + echo "Usage: upload-pypi 1.2.3 [test]" + exit +fi + +if [ "$2" = "test" ]; then + export TWINE_REPOSITORY_URL=https://test.pypi.org/legacy/ +else + export TWINE_REPOSITORY_URL= +fi + +D=dist/borgbackup-$R.tar.gz + +twine upload $D.asc $D