From b3f07b43e379f6531b880427290809f71a2a743a Mon Sep 17 00:00:00 2001 From: 4s3ti <4s3ti@4s3ti.net> Date: Thu, 16 Mar 2023 01:09:03 +0100 Subject: [PATCH] ci: Use xargs instead of find -exec Use pipe to xargs instead of find -exec to properly catch exit codes --- .travis.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4eb58cc..8027d9a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,8 @@ branches: only: - test - master + - dev + jobs: include: @@ -31,8 +33,8 @@ jobs: arch: amd64 script: - shellcheck -x auto_install/install.sh - - find ciscripts/ -type f -regex '.*\.sh' -exec shellcheck -x {} \; - - find scripts/ -type f -exec shellcheck -x {} \; + - find ciscripts/ -type f -regex '.*\.sh'| xargs shellcheck -x + - find scripts/ -type f | xargs shellcheck -x - stage: style name: "Shell Style Guide" @@ -44,8 +46,8 @@ jobs: arch: amd64 script: - 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 scripts/ -type f -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 | xargs shfmt -d -i 2 -ci -sr -bn - stage: test name: "OpenVPN Bionic (18.04)" @@ -162,4 +164,4 @@ jobs: - npm install @semantic-release/github -D - npm install @semantic-release/changelog -D script: - - npx semantic-release \ No newline at end of file + - npx semantic-release