From e23f3a5ed98c5a1850ea7a4a333b1392b9325c5e Mon Sep 17 00:00:00 2001 From: ThomasV Date: Sat, 22 Aug 2015 12:58:31 +0200 Subject: [PATCH] separate signing script --- contrib/make_packages | 17 +---------------- contrib/sign_packages | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 16 deletions(-) create mode 100755 contrib/sign_packages diff --git a/contrib/make_packages b/contrib/make_packages index c7bf9d1b7..999ca8d75 100755 --- a/contrib/make_packages +++ b/contrib/make_packages @@ -46,21 +46,6 @@ if __name__ == '__main__': os.system("pyrcc4 icons.qrc -o gui/qt/icons_rc.py") os.system("python setup.py sdist --format=zip,gztar") - _tgz="Electrum-%s.tar.gz"%version - _zip="Electrum-%s.zip"%version + print "Packages are ready in dist" - os.chdir("dist") - password = getpass.getpass("Password:") - for f in [_tgz,_zip]: - os.system( "gpg --sign --armor --detach --passphrase \"%s\" %s"%(password, f) ) - - md5_tgz = hashlib.md5(file(_tgz, 'r').read()).digest().encode('hex') - md5_zip = hashlib.md5(file(_zip, 'r').read()).digest().encode('hex') - os.chdir("..") - - print "" - print "Packages are ready:" - print "dist/%s "%_tgz, md5_tgz - print "dist/%s "%_zip, md5_zip - print "To make a release, upload the files to the server, and update the webpages in branch gh-pages" diff --git a/contrib/sign_packages b/contrib/sign_packages new file mode 100755 index 000000000..902ad5155 --- /dev/null +++ b/contrib/sign_packages @@ -0,0 +1,19 @@ +#!/usr/bin/python + +import sys, re, shutil, os, hashlib +import imp +import getpass + +if __name__ == '__main__': + + os.chdir("dist") + password = getpass.getpass("Password:") + for f in os.listdir('.'): + if f.endswith('asc'): + continue + os.system( "gpg --sign --armor --detach --passphrase \"%s\" %s"%(password, f) ) + + os.chdir("..") + + +