Update TravisCI to use exiting env var
$TRAVIS_COMMIT_RANGE was broken but it seems what we're doing is worse and resulting in false negatives. The result of the bad range was that we weren't running lint or tests for things we should have been. It actually looks like $TRAVIS_COMMIT has been wrong and it's not clear why this has been working at all.
This commit is contained in:
parent
68a2f89cc6
commit
08b1515f7f
|
@ -8,10 +8,6 @@ cache:
|
|||
- node_modules
|
||||
before_install:
|
||||
- |
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||
PR_FIRST=$(curl -s https://github.com/${TRAVIS_REPO_SLUG}/pull/${TRAVIS_PULL_REQUEST}.patch | head -1 | grep -o -E '\b[0-9a-f]{40}\b' | tr -d '\n')
|
||||
TRAVIS_COMMIT_RANGE=$PR_FIRST^..$TRAVIS_COMMIT
|
||||
fi
|
||||
git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)|(^(docs|examples))/' || {
|
||||
echo "Only docs were updated, stopping build process."
|
||||
exit
|
||||
|
|
Loading…
Reference in New Issue