make_downloads: generate signature lists
This commit is contained in:
@@ -14,6 +14,10 @@ APK_VERSION = version_module.APK_VERSION
|
||||
print("version", ELECTRUM_VERSION)
|
||||
|
||||
dirname = sys.argv[1]
|
||||
|
||||
# GPG names of extra signers
|
||||
extra_signers = sys.argv[2:]
|
||||
|
||||
print("directory", dirname)
|
||||
|
||||
download_page = os.path.join(dirname, "panel-download.html")
|
||||
@@ -32,7 +36,6 @@ string = string.replace("##VERSION_APK##", APK_VERSION)
|
||||
files = {
|
||||
'tgz': "Electrum-%s.tar.gz" % version,
|
||||
'appimage': "electrum-%s-x86_64.AppImage" % version,
|
||||
'zip': "Electrum-%s.zip" % version,
|
||||
'mac': "electrum-%s.dmg" % version_mac,
|
||||
'win': "electrum-%s.exe" % version_win,
|
||||
'win_setup': "electrum-%s-setup.exe" % version_win,
|
||||
@@ -41,10 +44,33 @@ files = {
|
||||
'apk_armeabi': "Electrum-%s-armeabi-v7a-release.apk" % APK_VERSION,
|
||||
}
|
||||
|
||||
for k, n in files.items():
|
||||
link = "https://download.electrum.org/%s/%s"%(version,n)
|
||||
string = string.replace("##link_%s##"%k, link)
|
||||
|
||||
for k, n in files.items():
|
||||
path = "dist/%s"%n
|
||||
link = "https://download.electrum.org/%s/%s"%(version,n)
|
||||
if not os.path.exists(path):
|
||||
os.system("wget -q %s -O %s" % (link, path))
|
||||
if not os.path.getsize(path):
|
||||
raise Exception(path)
|
||||
|
||||
string = string.replace("##link_%s##"%k, link)
|
||||
sig_ThomasV = link + '.ThomasV.asc'
|
||||
sig_SomberNight = link + '.sombernight_releasekey.asc'
|
||||
sigs = [
|
||||
"<a href=\"%s\">%s</a>"%(sig_ThomasV, 'ThomasV'),
|
||||
"<a href=\"%s\">%s</a>"%(sig_SomberNight, 'SomberNight'),
|
||||
]
|
||||
|
||||
for signer in extra_signers:
|
||||
sig_name = n + '.'+signer+'.asc'
|
||||
sig_url = "https://raw.githubusercontent.com/spesmilo/electrum-signatures/master/%s/%s/%s"%(version, n, sig_name)
|
||||
sig_path = "dist/%s"% sig_name
|
||||
os.system("wget %s -O %s"%(sig_url, sig_path))
|
||||
if os.system("gpg --verify %s %s"%(sig_path, path)) != 0:
|
||||
raise Exception(sig_name)
|
||||
sigs.append( "<a href=\"%s\">%s</a>"%(sig_url, signer) )
|
||||
sigs = '\n'+',\n'.join(sigs)+'\n'
|
||||
string = string.replace("##sigs_%s##"%k, sigs)
|
||||
|
||||
with open(download_page,'w') as f:
|
||||
f.write(string)
|
||||
|
||||
Reference in New Issue
Block a user