ci/deviceinfo_linting: only line deviceinfo files in the devices repo

If devicepkg-dev changes, we don't want to lint the test deviceinfo
files there...

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7830>
This commit is contained in:
Clayton Craft
2026-01-27 12:33:06 -08:00
committed by The Friendly Merge Bot
parent 382cd1dee1
commit f68c270d4d
+2 -1
View File
@@ -11,8 +11,9 @@ if __name__ == "__main__":
if common.commit_message_has_string("[ci:skip-dint]"):
print("WARNING: not linting deviceinfo files ([ci:skip-dint])")
exit(0)
# only lint deviceinfo files in the devices repo
deviceinfo_files = {file for file in common.get_changed_files(removed=False)
if os.path.basename(file) == "deviceinfo"}
if os.path.basename(file) == "deviceinfo" and file.startswith("device/")}
try:
subprocess.run(["dint", "check", *deviceinfo_files], text=True, check=True)