From 15e8d77968d0e021e2f901dbe2ca4ebdec91a9de Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 12 Jul 2017 07:54:56 +0100 Subject: [PATCH] tools: travis: skip the build if only markdown files are changed (2) --- .travis-maybe-skip.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis-maybe-skip.sh b/.travis-maybe-skip.sh index b9b03eb3c..32e91df8e 100755 --- a/.travis-maybe-skip.sh +++ b/.travis-maybe-skip.sh @@ -7,8 +7,7 @@ set -e # works only on master ? CHANGED_FILES=`git diff --name-only master...${TRAVIS_COMMIT}` -# only files not matching this pattern will trigger a build -# extended regex, don't quote regex metachars +# only files not matching this extended regex will trigger a build #SKIP_PAT="(^site/con|do.nload)" SKIP_PAT="\.md$" @@ -21,6 +20,13 @@ for F in $CHANGED_FILES; do fi done +# standard travis helper, not in scope for some reason +travis_terminate() { + set +e + pkill -9 -P $$ &> /dev/null || true + exit $1 +} + if [[ $SKIP == True ]]; then echo "Only skippable files found, exiting." travis_terminate 0