Browse Source

Merge pull request #2967 from ThomasWaldmann/f/travis-stop-1.1

travis: only short-circuit docs-only changes for pull requests
TW 7 years ago
parent
commit
4abbc8639c
1 changed files with 6 additions and 4 deletions
  1. 6 4
      .travis.yml

+ 6 - 4
.travis.yml

@@ -44,10 +44,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: