From 1f9135c79066287ca55dacffb3704fc7e4dc8a81 Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Thu, 22 Sep 2016 17:51:49 -0400 Subject: [PATCH] Internal: cancel build with only .md changes --- .travis.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.travis.yml b/.travis.yml index 73b20a1c8d1b..4ca458d5ef50 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,15 @@ language: 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$)|(^(doc))/' || { + echo "Only docs were updated, stopping build process." + exit + } node_js: - '6' - '5'