CI: apkbuild-lint: fix checking only the 1st file
apkbuild-lint only checks the file from the first parameter: $ apkbuild-lint main/postmarketos-ui-phosh/APKBUILD IC[AL65]:main/postmarketos-ui-phosh/APKBUILD:66:2:non-local 'install' variable in function 'openrc'. Add install scripts to global install variable instead. MC[AL49]:main/postmarketos-ui-phosh/APKBUILD:46:1:invalid option 'pmb:drm' MC[AL49]:main/postmarketos-ui-phosh/APKBUILD:46:1:invalid option 'pmb:systemd' $ apkbuild-lint main/hello-world/APKBUILD main/postmarketos-ui-phosh/APKBUILD (empty output!) Loop over the APKBUILDs we want to lint so all of them get checked. Signed-off-by: Oliver Smith <ollieparanoid@postmarketos.org> Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8735>
This commit is contained in:
@@ -57,7 +57,11 @@ if __name__ == "__main__":
|
|||||||
if len(apkbuilds_filtered) < 1:
|
if len(apkbuilds_filtered) < 1:
|
||||||
print("No APKBUILDs to lint")
|
print("No APKBUILDs to lint")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
try:
|
ret = 0
|
||||||
subprocess.run(["apkbuild-lint", *apkbuilds_filtered], text=True, check=True)
|
for apkbuild in apkbuilds_filtered:
|
||||||
except subprocess.CalledProcessError as exception:
|
try:
|
||||||
sys.exit(exception.returncode)
|
cmd = ["apkbuild-lint", apkbuild]
|
||||||
|
subprocess.run(cmd, text=True, check=True)
|
||||||
|
except subprocess.CalledProcessError as exception:
|
||||||
|
ret = exception.returncode
|
||||||
|
sys.exit(ret)
|
||||||
|
|||||||
Reference in New Issue
Block a user