iOS: keep older build numbers when regenerating the source

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cdnutterandClaude Opus 5.5 committed 2026-10-20 09:18:42 -07:00
1 parent 3f7fd76762
commit d149af336a
2 files changed
+8 -2

No files matched your search

+7 -1
View File
@@ -19,7 +19,13 @@ def get(url):
yml = open(os.path.join(HERE, "..", "project.yml")).read()
builds = {} # only the current build number is known locally; older ones fall back to the version
# Build numbers: older ones from the last source.json, the current one from project.yml.
builds = {}
try:
for v in json.load(open(os.path.join(HERE, "..", "source.json")))["apps"][0]["versions"]:
builds[v["version"]] = v["buildVersion"]
except (OSError, ValueError, KeyError, IndexError):
pass
m = re.search(r'MARKETING_VERSION: "(.*)"', yml), re.search(r'CURRENT_PROJECT_VERSION: "(.*)"', yml)
builds[m[0][1]] = m[1][1]