update: fetch Builds one time and reuse

This commit is contained in:
Hans-Christoph Steiner 2025-07-08 20:44:21 +02:00
parent 8f1411607a
commit ba5c78d45f

View file

@ -1185,14 +1185,9 @@ def insert_localized_app_metadata(apps):
# flavors specified in build receipt # flavors specified in build receipt
build_flavors = [] build_flavors = []
if ( if builds and 'gradle' in builds[-1] and builds[-1]['gradle'] != ['yes']:
apps[packageName]
and len(apps[packageName].get('Builds', [])) > 0
and 'gradle' in apps[packageName]['Builds'][-1]
and apps[packageName]['Builds'][-1]['gradle'] != ['yes']
):
build_flavors = common.calculate_gradle_flavor_combination( build_flavors = common.calculate_gradle_flavor_combination(
apps[packageName]['Builds'][-1]['gradle'] builds[-1]['gradle']
) )
if len(segments) >= 5 and segments[4] == "fastlane" and segments[3] not in build_flavors: if len(segments) >= 5 and segments[4] == "fastlane" and segments[3] not in build_flavors:
@ -1234,9 +1229,7 @@ def insert_localized_app_metadata(apps):
try: try:
versionCode = int(base) versionCode = int(base)
locale = segments[-2] locale = segments[-2]
if versionCode in [ if versionCode in [b["versionCode"] for b in builds]:
a["versionCode"] for a in apps[packageName]["Builds"]
]:
_set_localized_text_entry( _set_localized_text_entry(
apps[packageName], apps[packageName],
locale, locale,