Makefile: Use 'ifdef TRAVIS_COMMIT_RANGE' for git-validation

Only use the auto-ranging when Travis tells us what the range is.  Use
our EPOCH_TEST_COMMIT-based range in all other cases.

ifdef is described in [1].

[1]: https://www.gnu.org/software/make/manual/html_node/Conditional-Syntax.html

Signed-off-by: W. Trevor King <wking@tremily.us>
This commit is contained in:
W. Trevor King 2017-01-23 15:59:05 -08:00
parent d9b7bc39b4
commit dd40abea2e
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ endif
# When this is running in travis, it will only check the travis commit range
.gitvalidation:
@which git-validation > /dev/null 2>/dev/null || (echo "ERROR: git-validation not found. Consider 'make install.tools' target" && false)
ifeq ($(TRAVIS),true)
ifdef TRAVIS_COMMIT_RANGE
git-validation -q -run DCO,short-subject,dangling-whitespace
else
git-validation -v -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..HEAD