Skip to content

Commit

Permalink
screenshots: Check screenshots branch for each arch
Browse files Browse the repository at this point in the history
  • Loading branch information
barthalion committed Nov 13, 2023
1 parent 7869b06 commit 5109869
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions flatpak_builder_lint/checks/screenshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def check_repo(self, path: str) -> None:
if not os.path.exists(appstream_path):
self.errors.add("appstream-missing-appinfo-file")

# import ipdb; ipdb.set_trace()
root = etree.parse(appstream_path)
components = root.xpath("/components/component")

Expand All @@ -54,9 +53,11 @@ def check_repo(self, path: str) -> None:
self.errors.add("appstream-missing-screenshots")
return

if "screenshots/x86_64" not in refs:
self.errors.add("appstream-screenshots-not-mirrored")
return
arches = {ref.split("/")[2] for ref in refs}
for arch in arches:
if f"screenshots/{arch}" not in refs:
self.errors.add("appstream-screenshots-not-mirrored")
return

ostree_screenshots_cmd = ostree.cli(path, "ls", "-R", "screenshots/x86_64")
if ostree_screenshots_cmd["returncode"] != 0:
Expand Down

0 comments on commit 5109869

Please sign in to comment.