From 2599cff4cb2c33c0213a8f38bd7d158b8e4246a8 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Sat, 3 Apr 2021 21:07:03 +0200 Subject: [PATCH] Fix handling of existing tags --- bin/app-json.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/bin/app-json.py b/bin/app-json.py index 34b8e188..bfbb5272 100755 --- a/bin/app-json.py +++ b/bin/app-json.py @@ -177,10 +177,6 @@ def get_app_versions(app_path, cached_apps_json): existing_tags = [] for tag in tags: - if tag in existing_tags: - log.info(f"Skipping {tag} because we've already processed it") - continue - _run_cmd(f"git checkout {tag}") services_cmd = "yq e '.services | keys | .[]' compose*.yml" @@ -189,7 +185,18 @@ def get_app_versions(app_path, cached_apps_json): parsed_services = [] service_versions = {} for service in services: + if service in ("null", "---"): + continue + + if tag in existing_tags: + log.info(f"Skipping {tag} because we've already processed it") + existing_versions = cached_apps_json[app_name]["versions"][tag][service] + service_versions[service] = existing_versions + _run_cmd(f"git checkout {initial_branch}") + continue + if service in parsed_services: + log.info(f"Skipped {service} asa we've already parsed it locally") continue services_cmd = f"yq e '.services.{service}.image' compose*.yml"