zulip/tools/commit-message-lint
Tommy Ip a67ade2419 lint: Fix gitlint test due to non-deterministic git range.
This makes getting the commit SHA non time sensitive by using the
range provided by TravisCI.
2017-04-22 21:34:58 +01:00

15 lines
307 B
Bash
Executable File

#!/bin/bash
# Lint all commit messages that are newer than upstream/master if running
# locally or the commits in the push or PR if in TravisCI.
# The rules can be found in /.gitlint
if [ $TRAVIS ]; then
range=$TRAVIS_COMMIT_RANGE
else
range="upstream/master...HEAD"
fi
gitlint --commits $range