Skip to content

Commit

Permalink
tools: do not lint commit message if var undefined
Browse files Browse the repository at this point in the history
Check that $TRAVIS_COMMIT_RANGE is set before trying to lint commit
messages in Travis CI.

Refs: #23572 (comment)
Refs: #22842 (comment)

PR-URL: #23725
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Matheus Marchini <[email protected]>
  • Loading branch information
Trott authored and jasnell committed Oct 21, 2018
1 parent 77b3666 commit 40280e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ matrix:
script:
- make lint
# Lint the first commit in the PR.
- git log $TRAVIS_COMMIT_RANGE --pretty=format:'%h' --no-merges | tail -1 | xargs npx core-validate-commit --no-validate-metadata
- \[ -z "$TRAVIS_COMMIT_RANGE" \] || git log $TRAVIS_COMMIT_RANGE --pretty=format:'%h' --no-merges | tail -1 | xargs npx core-validate-commit --no-validate-metadata
- name: "Test Suite"
install:
- ./configure
Expand Down

0 comments on commit 40280e6

Please sign in to comment.