Skip to content

Commit c506b44

Browse files
committed
Merge pull request #2000 from RReverser/stop-travis-on-docs
Cancelling Travis build on commits with docs updates only.
2 parents f71455f + 233af7e commit c506b44

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ node_js:
55
cache:
66
directories:
77
- 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+
}
817
script:
918
- |
1019
grunt $TEST_TYPE

0 commit comments

Comments
 (0)