Skip to content

Commit 233af7e

Browse files
committed
Cancelling Travis build on commits with docs updates only.
Currently recognized patterns: * any Markdown files (*.md) * any files in docs or examples directories. Closes #1768.
1 parent e2dad02 commit 233af7e

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)