Compare commits

..

3 Commits

Author SHA1 Message Date
d1admin e6f4e942a2 Add title 2021-09-11 12:19:46 +02:00
d1admin 419e893968 Add issue template 2021-09-11 12:19:01 +02:00
d1admin 4529c05d2b fix: fix cached versions lookup logic
continuous-integration/drone/push Build is failing
2021-09-06 17:25:31 +02:00
2 changed files with 17 additions and 5 deletions
+8
View File
@@ -0,0 +1,8 @@
---
name: "Do not use this issue tracker"
about: "Do not use this issue tracker"
title: "Do not use this issue tracker"
labels: []
---
Please report your issue on [`coop-cloud/organising`](https://git.coopcloud.tech/coop-cloud/organising)
+9 -5
View File
@@ -139,6 +139,11 @@ def get_app_metadata(app_path):
return metadata
def get_cached_versions(cached_apps_json, app_name):
versions = cached_apps_json[app_name]["versions"]
return [list(k)[0] for k in [version.keys() for version in versions]]
def get_app_versions(app_path, cached_apps_json):
versions = []
@@ -155,7 +160,7 @@ def get_app_versions(app_path, cached_apps_json):
app_name = basename(app_path)
try:
existing_tags = cached_apps_json[app_name]["versions"].keys()
existing_tags = get_cached_versions(cached_apps_json, app_name)
except KeyError:
existing_tags = []
@@ -171,9 +176,8 @@ def get_app_versions(app_path, cached_apps_json):
if service in ("null", "---"):
continue
if (
tag in existing_tags
and service in cached_apps_json[app_name]["versions"][tag]
if tag in existing_tags and service in get_cached_versions(
cached_apps_json, app_name
):
log.info(f"Skipping {tag} because we've already processed it")
existing_versions = cached_apps_json[app_name]["versions"][tag][service]
@@ -220,7 +224,7 @@ def main():
skopeo_login()
repos_json = get_repos_json()
clone_all_apps(repos_json)
# clone_all_apps(repos_json)
with open(args.output, "w", encoding="utf-8") as handle:
dump(