gitlab-ci: Use single liner for style checking

Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
This commit is contained in:
Vasilis Tsiligiannis 2019-12-20 17:30:40 +02:00
parent 4bdd9148da
commit de60d51969
1 changed files with 1 additions and 3 deletions

View File

@ -12,9 +12,7 @@ style:
- apt-get update -qq - apt-get update -qq
- apt-get install -qq -y astyle - apt-get install -qq -y astyle
script: script:
- if (test $(astyle --dry-run --options=.astylerc --formatted lib/*.cc | wc -l) -eq 0); then (exit 0); else (exit 1); fi - 'astyle --dry-run --options=.astylerc --formatted lib/*.cc lib/*.h include/satnogs/*.h | sed ''s/^Formatted/ERROR: Unformatted/;T;q1'''
- if (test $(astyle --dry-run --options=.astylerc --formatted lib/*.h | wc -l) -eq 0); then (exit 0); else (exit 1); fi
- if (test $(astyle --dry-run --options=.astylerc --formatted include/satnogs/*.h | wc -l) -eq 0); then (exit 0); else (exit 1); fi
test: test:
image: ${GITLAB_CI_IMAGE_DEBIAN} image: ${GITLAB_CI_IMAGE_DEBIAN}
stage: test stage: test