ci/apkbuild-linting: quit if there are no apkbuilds to lint (MR 2630)

If the only changed apkbuilds are skipped, then the check would lint
*every* apkbuild in aports (calling '-q lint' with no packages
apparently causes it to do everything)

This quits if all packages were skipped. It fixes the CI failure seen on
MR !2600
This commit is contained in:
Clayton Craft 2021-10-24 00:05:02 -07:00 committed by Dylan Van Assche
parent d60ff7eb32
commit 82fba2bdb2
No known key found for this signature in database
GPG key ID: 8642571587897EA1

View file

@ -19,6 +19,9 @@ if __name__ == "__main__":
print(f"NOTE: Skipping linting of {apkbuild}") print(f"NOTE: Skipping linting of {apkbuild}")
continue continue
packages.append(os.path.basename(os.path.dirname(apkbuild))) packages.append(os.path.basename(os.path.dirname(apkbuild)))
if len(packages) < 1:
print("No APKBUILDs to lint")
sys.exit(0)
result = common.run_pmbootstrap(["-q", "lint"] + packages, output_return=True) result = common.run_pmbootstrap(["-q", "lint"] + packages, output_return=True)