ctcci: add apksigner support

This commit is contained in:
ave 2019-11-26 21:21:08 +03:00
parent 446fe76e08
commit c3e1a54ff9
No known key found for this signature in database
GPG key ID: 09356ABAA42C842B
2 changed files with 15 additions and 4 deletions

View file

@ -230,6 +230,14 @@ APK_PATH = os.path.join(WORK_FOLDER, "discord",
"dist", f"{PACKAGE_ID}-{VERSION}.apk")
# Sign the APK
if DO_APKSIGNER:
subprocess.run(f"apksigner sign --ks {KEYSTORE_FILE}"
f"--ks-key-alias {KEYSTORE_ALIAS} "
f"--ks-pass pass:{KEYSTORE_PASS}"
f"{APK_PATH}",
shell=True,
cwd=WORK_FOLDER)
else:
subprocess.run(f"jarsigner -storepass {KEYSTORE_PASS} -keystore "
f"{KEYSTORE_FILE} {APK_PATH} {KEYSTORE_ALIAS}",
shell=True,

View file

@ -23,6 +23,9 @@ RESULT_FOLDER = FDROID_FOLDER + "/repo"
DO_GITPULL = True
REPO_FOLDER = "/home/ave/distokrepos/cutthecord"
# If false, jarsigner will be used for signing the apk.
DO_APKSIGNER = False
# Keystore file, alias and pass. Required.
KEYSTORE_FILE = "/home/ave/oof.keystore"
KEYSTORE_ALIAS = "distok"