mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Merge pull request #2000 from RReverser/stop-travis-on-docs
Cancelling Travis build on commits with docs updates only.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user