travis: Only build changes if there are changes outside of ./doc

This commit is contained in:
Matthias Beyer 2016-01-08 11:25:45 +01:00
parent 3ea9721184
commit 8d4bb2a88b
1 changed files with 8 additions and 4 deletions

View File

@ -16,10 +16,14 @@ before_script:
script:
- |
travis-cargo build &&
travis-cargo test &&
travis-cargo bench &&
travis-cargo --only stable doc
if [[ "doc" == $(git diff --name-only $TRAVIS_BRANCH..$TRAVIS_COMMIT | cut -d "/" -f 1 | uniq) ]]; then
echo "There are only changes in the ./doc directory... not doing anything"
else
travis-cargo build &&
travis-cargo test &&
travis-cargo bench &&
travis-cargo --only stable doc
fi
addons:
apt: