From 920d974b2504dd55ea12e2e018eb308246c4e21e Mon Sep 17 00:00:00 2001 From: Marian Beermann Date: Thu, 24 Aug 2017 16:24:44 +0200 Subject: [PATCH] travis: only short-circuit docs-only changes for pull requests if a branch build is stopped, then codecov will complain about missing base branch coverage. --- .travis.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 572cc9a08..8f3d9b2ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,10 +35,12 @@ matrix: before_install: - | - echo Checking whether $TRAVIS_COMMIT_RANGE changed only docs - git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(AUTHORS|README\.rst|^(docs)/)' || { - echo "Only docs were updated, stopping build process." - exit + test $TRAVIS_EVENT_TYPE != "pull_request" || { + echo Checking whether $TRAVIS_COMMIT_RANGE changed only docs + git diff --name-only $TRAVIS_COMMIT_RANGE | grep --quiet --invert-match --extended-regexp '(AUTHORS|README\.rst|^(docs)/)' || { + echo "Only docs were updated, stopping build process." + exit + } } install: