travis: exit(0) if there are only changes in ./doc

This commit is contained in:
Matthias Beyer 2016-01-14 12:03:25 +01:00
parent ec6ac7794f
commit 656f7accbf
1 changed files with 11 additions and 0 deletions

View File

@ -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 &&