From 778949714047cd04c58545a00546741ffc625f41 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Fri, 30 Apr 2021 10:27:33 +0000 Subject: [PATCH] release script: add username to signature file, upload files into airlock. --- contrib/make_download | 4 ++-- contrib/release.sh | 6 ++---- contrib/sign_packages | 14 ++++++-------- contrib/upload | 6 +++--- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/contrib/make_download b/contrib/make_download index 90bfbb948..737d0b139 100755 --- a/contrib/make_download +++ b/contrib/make_download @@ -48,8 +48,8 @@ for k, n in files.items(): os.unlink(path) string = re.sub("
(.*?)
"%k, '', string, flags=re.DOTALL + re.MULTILINE) continue - sigpath = path + '.asc' - siglink = link + '.asc' + sigpath = path + '.ThomasV.asc' + siglink = link + '.ThomasV.asc' if not os.path.exists(sigpath): os.system("wget -q %s -O %s" % (siglink, sigpath)) if not os.path.getsize(sigpath): diff --git a/contrib/release.sh b/contrib/release.sh index 312502ccc..0f9bf800d 100755 --- a/contrib/release.sh +++ b/contrib/release.sh @@ -8,8 +8,6 @@ ELECTRUM_DIR=/opt/electrum WWW_DIR=/opt/electrum-web -# Note: -# uploadserver and website are set in /etc/hosts cd $ELECTRUM_DIR # rm -rf dist/* @@ -138,7 +136,7 @@ if test -f dist/electrum-$VERSION.dmg; then echo "packages are already signed" else echo "signing packages" - ./contrib/sign_packages + ./contrib/sign_packages ThomasV fi else echo "dmg is missing, aborting" @@ -175,7 +173,7 @@ fi if test -f dist/uploaded; then echo "files already uploaded" else - ./contrib/upload uploadserver + ./contrib/upload touch dist/uploaded fi diff --git a/contrib/sign_packages b/contrib/sign_packages index 0f28a770d..2acf76468 100755 --- a/contrib/sign_packages +++ b/contrib/sign_packages @@ -1,14 +1,12 @@ #!/usr/bin/env python3 -import os -import getpass +import os, sys if __name__ == '__main__': - + username = sys.argv[1] os.chdir("dist") - password = getpass.getpass("Password:") - for f in os.listdir('.'): - if f.endswith('asc'): + for name in os.listdir('.'): + if name.endswith('asc'): continue - os.system("gpg --sign --armor --detach --passphrase \"%s\" %s"%(password, f)) - + sig_name = name + '.' + username + '.asc' + os.system("gpg --sign --armor --detach --output %s %s"%(sig_name, name)) os.chdir("..") diff --git a/contrib/upload b/contrib/upload index e62cefa3c..3e7ba6d91 100755 --- a/contrib/upload +++ b/contrib/upload @@ -1,16 +1,16 @@ #!/bin/bash +# uploadserver is set in /etc/hosts set -e -host=$1 version=`git describe --tags` echo $version here=$(dirname "$0") cd $here/../dist -sftp -oBatchMode=no -b - thomasv@$host << ! - cd electrum-downloads +sftp -oBatchMode=no -b - thomasv@uploadserver << ! + cd electrum-downloads-airlock mkdir $version cd $version mput *