Skip to content

Commit

Permalink
version.py: rm APK_VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
SomberNight committed Oct 14, 2024
1 parent a3786a4 commit e72b7ca
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 21 deletions.
9 changes: 4 additions & 5 deletions contrib/add_cosigner
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,12 @@ version_module = importlib.util.module_from_spec(version_spec)
version_spec.loader.exec_module(version_module)

ELECTRUM_VERSION = version_module.ELECTRUM_VERSION
APK_VERSION = version_module.APK_VERSION
print("version", ELECTRUM_VERSION)

# GPG name of cosigner
cosigner = sys.argv[1]

version = version_win = version_mac = ELECTRUM_VERSION
version = version_win = version_mac = version_android = ELECTRUM_VERSION

files = {
"tgz": f"Electrum-{version}.tar.gz",
Expand All @@ -53,9 +52,9 @@ files = {
"win": f"electrum-{version_win}.exe",
"win_setup": f"electrum-{version_win}-setup.exe",
"win_portable": f"electrum-{version_win}-portable.exe",
"apk_arm64": f"Electrum-{APK_VERSION}-arm64-v8a-release.apk",
"apk_armeabi": f"Electrum-{APK_VERSION}-armeabi-v7a-release.apk",
"apk_x86_64": f"Electrum-{APK_VERSION}-x86_64-release.apk",
"apk_arm64": f"Electrum-{version_android}-arm64-v8a-release.apk",
"apk_armeabi": f"Electrum-{version_android}-armeabi-v7a-release.apk",
"apk_x86_64": f"Electrum-{version_android}-x86_64-release.apk",
}


Expand Down
2 changes: 1 addition & 1 deletion contrib/android/buildozer_qml.spec
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ source.exclude_patterns = Makefile,setup*,
packages/frozenlist-*.dist-info/*

# (str) Application versioning (method 1)
version.regex = APK_VERSION = '(.*)'
version.regex = ELECTRUM_VERSION = '(.*)'
version.filename = %(source.dir)s/electrum/version.py

# (str) Application versioning (method 2)
Expand Down
9 changes: 4 additions & 5 deletions contrib/make_download
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ version_module = importlib.util.module_from_spec(version_spec)
version_spec.loader.exec_module(version_module)

ELECTRUM_VERSION = version_module.ELECTRUM_VERSION
APK_VERSION = version_module.APK_VERSION
print(f"version: {ELECTRUM_VERSION}", file=sys.stderr)

dirname = sys.argv[1]
Expand All @@ -37,7 +36,7 @@ download_page_str = download_page_str.replace("##VERSION##", version)
download_page_str = download_page_str.replace("##VERSION_WIN##", version_win)
download_page_str = download_page_str.replace("##VERSION_MAC##", version_mac)
download_page_str = download_page_str.replace("##VERSION_ANDROID##", version_android)
download_page_str = download_page_str.replace("##VERSION_APK##", APK_VERSION)
download_page_str = download_page_str.replace("##VERSION_APK##", version_android)

# note: all dist files need to be listed here that we expect sigs for,
# even if they are not linked to from the website
Expand All @@ -49,9 +48,9 @@ files = {
"win": f"electrum-{version_win}.exe",
"win_setup": f"electrum-{version_win}-setup.exe",
"win_portable": f"electrum-{version_win}-portable.exe",
"apk_arm64": f"Electrum-{APK_VERSION}-arm64-v8a-release.apk",
"apk_armeabi": f"Electrum-{APK_VERSION}-armeabi-v7a-release.apk",
"apk_x86_64": f"Electrum-{APK_VERSION}-x86_64-release.apk",
"apk_arm64": f"Electrum-{version_android}-arm64-v8a-release.apk",
"apk_armeabi": f"Electrum-{version_android}-armeabi-v7a-release.apk",
"apk_x86_64": f"Electrum-{version_android}-x86_64-release.apk",
}

# default signers
Expand Down
2 changes: 0 additions & 2 deletions contrib/print_electrum_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
#
# For example:
# $ VERSION=$("$CONTRIB"/print_electrum_version.py)
# $ VERSION=$("$CONTRIB"/print_electrum_version.py APK_VERSION)
# instead of
# $ VERSION=$(python3 -c "import electrum; print(electrum.version.ELECTRUM_VERSION)")
# $ VERSION=$(python3 -c "import electrum; print(electrum.version.APK_VERSION)")

import importlib.util
import os
Expand Down
12 changes: 5 additions & 7 deletions contrib/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ fi


VERSION=$("$CONTRIB"/print_electrum_version.py)
APK_VERSION=$("$CONTRIB"/print_electrum_version.py APK_VERSION)
info "VERSION: $VERSION"
info "APK_VERSION: $APK_VERSION"
REV=$(git describe --tags)
info "REV: $REV"
COMMIT=$(git rev-parse HEAD)
Expand Down Expand Up @@ -149,13 +147,13 @@ else
fi

# android
apk1="Electrum-$APK_VERSION-armeabi-v7a-release.apk"
apk2="Electrum-$APK_VERSION-arm64-v8a-release.apk"
apk3="Electrum-$APK_VERSION-x86_64-release.apk"
apk1="Electrum-$VERSION-armeabi-v7a-release.apk"
apk2="Electrum-$VERSION-arm64-v8a-release.apk"
apk3="Electrum-$VERSION-x86_64-release.apk"
for arch in armeabi-v7a arm64-v8a x86_64
do
apk="Electrum-$APK_VERSION-$arch-release.apk"
apk_unsigned="Electrum-$APK_VERSION-$arch-release-unsigned.apk"
apk="Electrum-$VERSION-$arch-release.apk"
apk_unsigned="Electrum-$VERSION-$arch-release-unsigned.apk"
if test -f "dist/$apk"; then
info "file exists: $apk"
else
Expand Down
1 change: 0 additions & 1 deletion electrum/version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ELECTRUM_VERSION = '4.5.5' # version of the client package
APK_VERSION = '4.5.5.0' # read by buildozer.spec

PROTOCOL_VERSION = '1.4' # protocol version requested

Expand Down

0 comments on commit e72b7ca

Please sign in to comment.