From b547c8a85fa073ce3b5fb5ca08bf407b4c0cd055 Mon Sep 17 00:00:00 2001 From: Kyle K Date: Wed, 21 Aug 2019 18:21:05 +0000 Subject: [PATCH] Ignore the l10n_master branch for CI purposes https://docs.travis-ci.com/user/customizing-the-build/#building-specific-branches Documentation says that the .travis.yml file needs to be present on all active branches of the project. I don't know if that means we need to have this change in the branch for it to take effect. Also exiting builds early if --- .travis.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.travis.yml b/.travis.yml index b5adde47..857c8f6c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,7 @@ +branches: + except: + - l10n_master + os: - linux - osx @@ -22,6 +26,20 @@ node_js: addons: chrome: stable +before_install: + - | + echo "Target branch: $TRAVIS_BRANCH" + echo "Commit range: $TRAVIS_COMMIT_RANGE" + if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then + COMMIT_RANGE="$TRAVIS_BRANCH" + else + COMMIT_RANGE="$TRAVIS_COMMIT_RANGE" + fi + git diff --name-only $COMMIT_RANGE | grep -qvE '(\.md)|(^(locales|resources/osd))/' || { + echo "Only files not used in the build process were updated, aborting." + exit + } + script: - yarn test - yarn gulp release