Fixed check for non-build files in Travis.

This commit is contained in:
mikeller 2019-02-23 18:36:38 +13:00
parent 9bf65ba628
commit fcf4fa4b1c
1 changed files with 6 additions and 2 deletions

View File

@ -43,10 +43,14 @@ env:
before_install: before_install:
- | - |
echo "Target branch: $TRAVIS_BRANCH"
echo "Commit range: $TRAVIS_COMMIT_RANGE"
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
TRAVIS_COMMIT_RANGE="FETCH_HEAD...$TRAVIS_BRANCH" COMMIT_RANGE="$TRAVIS_BRANCH"
else
COMMIT_RANGE="$TRAVIS_COMMIT_RANGE"
fi fi
git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)|(^(docs|support|unified_targets))/' || { git diff --name-only $COMMIT_RANGE | grep -qvE '(\.md$)|(^(docs|support|unified_targets))/' || {
echo "Only files not used in the build process were updated, aborting." echo "Only files not used in the build process were updated, aborting."
exit exit
} }