Skip to content
Permalink
Browse files

tools: do not lint commit message if var undefined

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 <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
  • Loading branch information...
Trott authored and MylesBorins committed Oct 18, 2018
1 parent ac83a14 commit 28599e896a4d23da246935561dc7e98fc7c69953
Showing with 1 addition and 1 deletion.
  1. +1 −1 .travis.yml
@@ -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

0 comments on commit 28599e8

Please sign in to comment.
You can’t perform that action at this time.