Skip to content
Snippets Groups Projects
Commit 80a62d7a authored by Minecrell's avatar Minecrell
Browse files

CI: debug

parent acc894cb
No related branches found
No related tags found
No related merge requests found
Pipeline #191333 passed
......@@ -124,6 +124,7 @@ if __name__ == "__main__":
# Get and print modified packages
common.add_upstream_git_remote()
packages = common.get_changed_packages()
print(f"Changed packages: {packages}")
# Verify modified package count
common.get_changed_packages_sanity_check(len(packages))
......
......@@ -119,12 +119,17 @@ def get_changed_packages(with_directory=False):
if "/" not in file or file.startswith(".") or not os.path.exists(file):
continue
# Check that directory actually refers to a package (contains APKBUILD)
dirname, filename = os.path.split(file)
if filename != "APKBUILD" and not os.path.exists(os.path.join(dirname, "APKBUILD")):
print(f"Note: Changed file outside of any package: {file}")
continue
# Add to the ret set (removes duplicated automatically)
if with_directory:
ret.add(file)
else:
# device/testing/device-something/APKBUILD -> device-something
ret.add(file.split("/")[-2])
ret.add(os.path.basename(dir))
return ret
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment