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:
parent
75b8400f82
commit
ac3e4f8a70
1 changed files with 8 additions and 4 deletions
|
|
@ -57,7 +57,11 @@ if __name__ == "__main__":
|
|||
if len(apkbuilds_filtered) < 1:
|
||||
print("No APKBUILDs to lint")
|
||||
sys.exit(0)
|
||||
try:
|
||||
subprocess.run(["apkbuild-lint", *apkbuilds_filtered], text=True, check=True)
|
||||
except subprocess.CalledProcessError as exception:
|
||||
sys.exit(exception.returncode)
|
||||
ret = 0
|
||||
for apkbuild in apkbuilds_filtered:
|
||||
try:
|
||||
cmd = ["apkbuild-lint", apkbuild]
|
||||
subprocess.run(cmd, text=True, check=True)
|
||||
except subprocess.CalledProcessError as exception:
|
||||
ret = exception.returncode
|
||||
sys.exit(ret)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue