CI: use pmbootstrap lint for checking packages (MR 1132)
This commit is contained in:
parent
233ec0d21c
commit
5ead73e86c
2 changed files with 7 additions and 6 deletions
|
@ -85,9 +85,10 @@ aports-static:
|
|||
aport-lint:
|
||||
stage: first
|
||||
before_script:
|
||||
- apk -q add git atools python3
|
||||
- wget "https://gitlab.com/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
- sh ./install_pmbootstrap.sh
|
||||
script:
|
||||
- .gitlab-ci/apkbuild-linting.py
|
||||
- su pmos -c ".gitlab-ci/apkbuild-linting.py"
|
||||
only:
|
||||
- merge_requests
|
||||
allow_failure: true
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
import common
|
||||
import os.path
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -20,9 +19,10 @@ if __name__ == "__main__":
|
|||
print(f"NOTE: Skipping linting of {apkbuild}")
|
||||
continue
|
||||
|
||||
result = subprocess.run(["apkbuild-lint", apkbuild], capture_output=True)
|
||||
if len(result.stdout) > 0:
|
||||
issues.append([apkbuild, result.stdout.decode("utf-8")])
|
||||
package = os.path.basename(os.path.dirname(apkbuild))
|
||||
result = common.run_pmbootstrap(["-q", "lint", package], output_return=True)
|
||||
if len(result) > 0:
|
||||
issues.append([apkbuild, result])
|
||||
|
||||
if len(issues) > 0:
|
||||
print("Linting issues found:")
|
||||
|
|
Loading…
Reference in a new issue