Merge pull request #9233 from SomberNight/202410_version_ann_versioncode
contrib/release_www.sh: put android versionCode in "version" file
This commit is contained in:
@@ -9,6 +9,7 @@ ARCH_DICT = {
|
|||||||
"arm64-v8a": "3",
|
"arm64-v8a": "3",
|
||||||
"armeabi-v7a": "2",
|
"armeabi-v7a": "2",
|
||||||
"x86": "1",
|
"x86": "1",
|
||||||
|
"null": "0",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -58,4 +59,5 @@ if __name__ == '__main__':
|
|||||||
print(f" should be one of: {list(ARCH_DICT.keys())}", file=sys.stderr)
|
print(f" should be one of: {list(ARCH_DICT.keys())}", file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
version_code = get_android_versioncode(arch_name=android_arch)
|
version_code = get_android_versioncode(arch_name=android_arch)
|
||||||
|
assert isinstance(version_code, int), f"{version_code=!r} must be an int."
|
||||||
print(version_code, file=sys.stdout)
|
print(version_code, file=sys.stdout)
|
||||||
|
|||||||
@@ -37,13 +37,28 @@ fi
|
|||||||
VERSION=$("$CONTRIB"/print_electrum_version.py)
|
VERSION=$("$CONTRIB"/print_electrum_version.py)
|
||||||
info "VERSION: $VERSION"
|
info "VERSION: $VERSION"
|
||||||
|
|
||||||
|
ANDROID_VERSIONCODE_NULLARCH=$("$CONTRIB"/android/get_apk_versioncode.py "null")
|
||||||
|
# ^ note: should parse as an integer in the final json
|
||||||
|
info "ANDROID_VERSIONCODE_NULLARCH: $ANDROID_VERSIONCODE_NULLARCH"
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
info "updating www repo"
|
info "updating www repo"
|
||||||
./contrib/make_download "$WWW_DIR"
|
./contrib/make_download "$WWW_DIR"
|
||||||
info "signing the version announcement file"
|
info "signing the version announcement file"
|
||||||
sig=$(./run_electrum -o signmessage $ELECTRUM_SIGNING_ADDRESS $VERSION -w $ELECTRUM_SIGNING_WALLET)
|
sig=$(./run_electrum -o signmessage $ELECTRUM_SIGNING_ADDRESS $VERSION -w $ELECTRUM_SIGNING_WALLET)
|
||||||
echo "{ \"version\":\"$VERSION\", \"signatures\":{ \"$ELECTRUM_SIGNING_ADDRESS\":\"$sig\"}}" > "$WWW_DIR"/version
|
# note: the contents of "extradata" are currently not signed. We could add another field, extradata_sigs,
|
||||||
|
# containing signature(s) for "extradata". extradata, being json, would have to be canonically
|
||||||
|
# serialized before signing.
|
||||||
|
cat <<EOF > "$WWW_DIR"/version
|
||||||
|
{
|
||||||
|
"version": "$VERSION",
|
||||||
|
"signatures": {"$ELECTRUM_SIGNING_ADDRESS": "$sig"},
|
||||||
|
"extradata": {
|
||||||
|
"android_versioncode_nullarch": $ANDROID_VERSIONCODE_NULLARCH
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
# push changes to website repo
|
# push changes to website repo
|
||||||
pushd "$WWW_DIR"
|
pushd "$WWW_DIR"
|
||||||
|
|||||||
Reference in New Issue
Block a user