summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Waldmann <tw@waldmann-edv.de>2019-02-01 21:57:47 +0100
committerThomas Waldmann <tw@waldmann-edv.de>2019-02-01 23:52:52 +0100
commitb32d6b134bffecaf9a7ef435812945df18f46634 (patch)
tree0ce5ec291da998cd3d68054ed02f26e936c6b04a
parente542396d87e4f6ebead6c01ca7d9918425acfbd8 (diff)
update release workflow using twine (docs, scripts), see #4213
-rw-r--r--docs/development.rst6
-rw-r--r--requirements.d/development.txt1
-rwxr-xr-xscripts/release2
-rwxr-xr-xscripts/sdist-sign20
-rwxr-xr-xscripts/upload-pypi18
5 files changed, 43 insertions, 4 deletions
diff --git a/docs/development.rst b/docs/development.rst
index c753e068a..2217bd507 100644
--- a/docs/development.rst
+++ b/docs/development.rst
@@ -285,9 +285,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 release milestone on Github
- announce on:
diff --git a/requirements.d/development.txt b/requirements.d/development.txt
index 71a5c28c8..44851ff3c 100644
--- a/requirements.d/development.txt
+++ b/requirements.d/development.txt
@@ -9,3 +9,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