From 656f7accbf3c41a8d41c5b01d2c1b108bf5d1ba4 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 14 Jan 2016 12:03:25 +0100 Subject: [PATCH] travis: exit(0) if there are only changes in ./doc --- .travis.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.travis.yml b/.travis.yml index 54878194..d88894af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,17 @@ matrix: allow_failures: - rust: nightly +before_install: + - | + c=$(git diff $TRAVIS_BRANCH..$TRAVIS_COMMIT --name-only | cut -d "/" -f 1 | uniq) + if [[ "$c" == "doc" ]]; then + echo "Only changes in DOC, exiting 0" + exit 0 + else + echo "Changes in other directories than ./doc" + echo "continue build..." + fi + before_script: - | pip install 'travis-cargo<0.2' --user &&