ci: Use xargs instead of find -exec

Use pipe to xargs instead of find -exec to properly catch exit codes
This commit is contained in:
4s3ti 2023-03-16 01:09:03 +01:00
parent 81646f30ff
commit b3f07b43e3

View file

@ -17,6 +17,8 @@ branches:
only: only:
- test - test
- master - master
- dev
jobs: jobs:
include: include:
@ -31,8 +33,8 @@ jobs:
arch: amd64 arch: amd64
script: script:
- shellcheck -x auto_install/install.sh - shellcheck -x auto_install/install.sh
- find ciscripts/ -type f -regex '.*\.sh' -exec shellcheck -x {} \; - find ciscripts/ -type f -regex '.*\.sh'| xargs shellcheck -x
- find scripts/ -type f -exec shellcheck -x {} \; - find scripts/ -type f | xargs shellcheck -x
- stage: style - stage: style
name: "Shell Style Guide" name: "Shell Style Guide"
@ -44,8 +46,8 @@ jobs:
arch: amd64 arch: amd64
script: script:
- shfmt -d -i 2 -ci -sr -bn auto_install/install.sh - shfmt -d -i 2 -ci -sr -bn auto_install/install.sh
- find ciscripts/ -type f -regex '.*\.sh' -exec shfmt -d -i 2 -ci -sr -bn {} \; - find ciscripts/ -type f -regex '.*\.sh' | xargs shfmt -d -i 2 -ci -sr -bn
- find scripts/ -type f -exec shfmt -d -i 2 -ci -sr -bn {} \; - find scripts/ -type f | xargs shfmt -d -i 2 -ci -sr -bn
- stage: test - stage: test
name: "OpenVPN Bionic (18.04)" name: "OpenVPN Bionic (18.04)"
@ -162,4 +164,4 @@ jobs:
- npm install @semantic-release/github -D - npm install @semantic-release/github -D
- npm install @semantic-release/changelog -D - npm install @semantic-release/changelog -D
script: script:
- npx semantic-release - npx semantic-release