build(android): build and sign a release, without the password touching anything
build-apk.ps1 -Release builds the Release configuration and signs with the user's keystore. Not through Delphi's Provisioning page, for three reasons: the .dproj is versioned, paclient --apksign puts the password ON THE COMMAND LINE where any process on the machine reads it, and tooling belongs in the repository rather than hidden in an IDE setting. apksigner called directly accepts --ks-pass env:. The password is asked for with Read-Host -AsSecureString - nothing echoed, nothing left in console history - handed over through an environment variable, and removed in a finally even when the script fails. It prints the certificate it signed with. A release signed by accident with the debug key installs and runs: nothing tells it apart in use, and one finds out only when the first update is refused. It does not install the release. Android refuses a different signature on an existing package, and uninstalling would wipe the local cache and the device's settings - a deliberate act, not a script's side effect. Keystores are gitignored. The debug path is unchanged and still builds.
This commit is contained in:
@@ -89,3 +89,9 @@ android-client/PMA.LocalConfig.inc
|
||||
android-client/theme/theme.RES
|
||||
android-client/theme/theme.res
|
||||
android-client/web/*.res
|
||||
|
||||
# Magasins de cles de signature. Le perdre interdit toute mise a jour de
|
||||
# l'application deja installee, Android refusant une signature differente :
|
||||
# il se sauvegarde ailleurs, il ne se versionne pas.
|
||||
*.jks
|
||||
*.keystore
|
||||
|
||||
Reference in New Issue
Block a user