Skip to content

Commit

Permalink
Cancelling Travis build on commits with docs updates only.
Browse files Browse the repository at this point in the history
Currently recognized patterns:

* any Markdown files (*.md)
* any files in docs or examples directories.

Closes facebook#1768.
  • Loading branch information
RReverser committed Aug 5, 2014
1 parent e2dad02 commit 233af7e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ node_js:
cache:
directories:
- node_modules
before_install:
- |
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
TRAVIS_COMMIT_RANGE="FETCH_HEAD...$TRAVIS_BRANCH"
fi
git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)|(^(docs|examples))/' || {
echo "Only docs were updated, stopping build process."
exit
}
script:
- |
grunt $TEST_TYPE
Expand Down

0 comments on commit 233af7e

Please sign in to comment.