commit d58c069336dcd5a58ae36c668ce458732e8e6f0b
parent 3293b36e0f0d983426f56781dedb7141e9b30b8c
Author: ThomasV <thomasv@electrum.org>
Date: Fri, 29 Jun 2018 10:45:34 +0200
read apk version number from version.py
Diffstat:
4 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/contrib/make_apk b/contrib/make_apk
@@ -1,7 +1,2 @@
#!/bin/bash
-pushd lib
-VERSION=$(python -c "import version; print version.ELECTRUM_VERSION")".0"
-popd
-echo $VERSION
-echo $VERSION > contrib/apk_version
pushd ./gui/kivy/; make apk; popd
diff --git a/contrib/make_download b/contrib/make_download
@@ -1,18 +1,26 @@
-#!/usr/bin/python2
+#!/usr/bin/python3
import re
import os
+import sys
-from versions import version, version_win, version_mac, version_android, version_apk
-from versions import download_template, download_page
+from electrum.version import ELECTRUM_VERSION, APK_VERSION
+print("version", ELECTRUM_VERSION)
+
+dirname = sys.argv[1]
+print("directory", dirname)
+
+download_page = os.path.join(dirname, "panel-download.html")
+download_template = download_page + ".template"
with open(download_template) as f:
string = f.read()
+version = version_win = version_mac = version_android = ELECTRUM_VERSION
string = string.replace("##VERSION##", version)
string = string.replace("##VERSION_WIN##", version_win)
string = string.replace("##VERSION_MAC##", version_mac)
string = string.replace("##VERSION_ANDROID##", version_android)
-string = string.replace("##VERSION_APK##", version_apk)
+string = string.replace("##VERSION_APK##", APK_VERSION)
files = {
'tgz': "Electrum-%s.tar.gz" % version,
@@ -47,5 +55,3 @@ for k, n in files.items():
with open(download_page,'w') as f:
f.write(string)
-
-
diff --git a/gui/kivy/tools/buildozer.spec b/gui/kivy/tools/buildozer.spec
@@ -24,8 +24,8 @@ source.exclude_dirs = bin, build, dist, contrib, gui/qt, gui/kivy/tools, gui/kiv
source.exclude_patterns = Makefile,setup*
# (str) Application versioning (method 1)
-version.regex = version_apk = '(.*)'
-version.filename = %(source.dir)s/contrib/versions.py
+version.regex = APK_VERSION = '(.*)'
+version.filename = %(source.dir)s/lib/version.py
# (str) Application versioning (method 2)
#version = 1.9.8
diff --git a/lib/version.py b/lib/version.py
@@ -1,5 +1,6 @@
ELECTRUM_VERSION = '3.2.0' # version of the client package
PROTOCOL_VERSION = '1.2' # protocol version requested
+APK_VERSION = '3.2.0.0' # read by buildozer.spec
# The hash of the mnemonic seed must begin with this
SEED_PREFIX = '01' # Standard wallet