From 82d05571fc13c72329d6e810ce51c8ce8913a139 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Fri, 5 Apr 2024 15:27:21 +0200 Subject: [PATCH] add scripts for sdist, sign, pypi upload --- scripts/sdist-sign | 20 ++++++++++++++++++++ scripts/upload-pypi | 18 ++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100755 scripts/sdist-sign create mode 100755 scripts/upload-pypi diff --git a/scripts/sdist-sign b/scripts/sdist-sign new file mode 100755 index 0000000..fc287c0 --- /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 -m build + +D=dist/emeraldtree-$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 0000000..61638c8 --- /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=testpypi +else + export TWINE_REPOSITORY=pypi +fi + +D=dist/emeraldtree-$R.tar.gz + +twine upload --repository=emeraldtree "$D"