build: do not lint on non-PR Travis builds

Do not run any linting at all when `TRAVIS_PULL_REQUEST` is `false`.
This would otherwise break Travis CI for `master` and release branches.

Refs: https://github.com/nodejs/node/pull/24030

PR-URL: https://github.com/nodejs/node/pull/24076
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
Anna Henningsen authored and Rich Trott committed 2018-11-04 06:42:38 -08:00
1 parent c6d29ccf5a
commit bde8eb5f82
1 file changed
+1 -1
+1 -1
View File
@@ -11,7 +11,7 @@ matrix:
script:
- make lint
# Lint the first commit in the PR.
- \[ "${TRAVIS_PULL_REQUEST}" != "false" \] && PR_ID=${TRAVIS_PULL_REQUEST}; bash tools/lint-pr-commit-message.sh ${PR_ID}
- \[ "${TRAVIS_PULL_REQUEST}" != "false" \] && bash tools/lint-pr-commit-message.sh ${TRAVIS_PULL_REQUEST}
- name: "Test Suite"
addons:
apt: