fix(ci): signature release réellement appliquée + maj in-app (open_filex)
Build APK / build (push) Successful in 2m28s
Build APK / build (push) Successful in 2m28s
- patch_android.py: gère 'signingConfig = signingConfigs.debug' (Flutter 3.24 utilise le '='), sans quoi le build restait signé en clé debug éphémère → signature différente à chaque run → 'conflit' à l'install de MAJ. Échoue désormais le build si la ligne n'est pas patchée (garde-fou). - update_service: télécharge l'APK in-app + lance l'installeur (open_filex), fallback navigateur ; barre de progression dans l'écran serveurs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
0257f0fa05
commit
a971204b80
+13
-5
@@ -62,14 +62,22 @@ if "signingConfigs {" not in s:
|
||||
r"(\n\s*buildTypes\s*\{)",
|
||||
'\n signingConfigs {\n'
|
||||
' release {\n'
|
||||
' keyAlias keystoreProperties["keyAlias"]\n'
|
||||
' keyPassword keystoreProperties["keyPassword"]\n'
|
||||
' storeFile file(keystoreProperties["storeFile"])\n'
|
||||
' storePassword keystoreProperties["storePassword"]\n'
|
||||
' keyAlias = keystoreProperties["keyAlias"]\n'
|
||||
' keyPassword = keystoreProperties["keyPassword"]\n'
|
||||
' storeFile = file(keystoreProperties["storeFile"])\n'
|
||||
' storePassword = keystoreProperties["storePassword"]\n'
|
||||
' }\n }\n\\1',
|
||||
s,
|
||||
count=1,
|
||||
)
|
||||
# Flutter 3.24 génère `signingConfig = signingConfigs.debug` (AVEC `=`). On gère
|
||||
# les deux formes pour ne jamais laisser le build release signé en clé debug
|
||||
# (sinon signature différente à chaque run CI → « conflit » à l'install de MAJ).
|
||||
before = s
|
||||
s = s.replace("signingConfig = signingConfigs.debug", "signingConfig = signingConfigs.release")
|
||||
s = s.replace("signingConfig signingConfigs.debug", "signingConfig signingConfigs.release")
|
||||
if s == before:
|
||||
raise SystemExit("patch_android: ERREUR — ligne 'signingConfig ... debug' introuvable, "
|
||||
"signature release NON appliquée (build annulé)")
|
||||
open(gr, "w").write(s)
|
||||
print("patch_android: OK")
|
||||
print("patch_android: OK (signature release appliquee)")
|
||||
|
||||
Reference in New Issue
Block a user