fix(install): stamp each APK build with a rising build number
This commit is contained in:
+10
-2
@@ -129,8 +129,16 @@ def build(kind, runner=subprocess.run, app=APP, cache=None, arguments=(), log=pr
|
||||
"-v", "pipelines-flutter-gradle:/home/builder/.gradle",
|
||||
"-v", "pipelines-android-sdk:/opt/android-sdk",
|
||||
"-v", f"{signing_dir()}:/home/builder/.android"]
|
||||
docker(runner, *command, tag, "pipelines-app-build", kind, *arguments)
|
||||
(work / ".complete").write_text(json.dumps({"key": key, "built": int(time.time())}) + "\n")
|
||||
built = int(time.time())
|
||||
stamp = ()
|
||||
if kind == "apk":
|
||||
# Android installs only a higher build number over the last one, so
|
||||
# each build is stamped when it is made (minutes since the epoch);
|
||||
# the stamp is not part of the reuse key.
|
||||
code = built // 60
|
||||
stamp = (f"--build-number={code}", f"--build-name=0.1.{code}")
|
||||
docker(runner, *command, tag, "pipelines-app-build", kind, *arguments, *stamp)
|
||||
(work / ".complete").write_text(json.dumps({"key": key, "built": built}) + "\n")
|
||||
if entry.exists():
|
||||
shutil.rmtree(entry)
|
||||
work.rename(entry)
|
||||
|
||||
Reference in New Issue
Block a user