Cancelling Travis build on commits with docs updates only.
Currently recognized patterns: * any Markdown files (*.md) * any files in docs or examples directories. Closes facebook/react#1768.
Ingvar Stepanyan committed
Aug 6, 2014 at 00:39 UTC
233af7e2dff4c79619f5cda6943388ff9e21581b
1 file changed
+9
.travis.yml
+9
@@ -5,6 +5,15 @@ node_js:
5
cache:
6
directories:
7
- node_modules
8
+before_install:
9
+- |
10
+ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
11
+ TRAVIS_COMMIT_RANGE="FETCH_HEAD...$TRAVIS_BRANCH"
12
+ fi
13
+ git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)|(^(docs|examples))/' || {
14
+ echo "Only docs were updated, stopping build process."
15
+ exit
16
+ }
17
script:
18
- |
19
grunt $TEST_TYPE