diff options
-rw-r--r-- | .travis.yml | 3 | ||||
-rw-r--r-- | check-git-history.py | 20 |
2 files changed, 11 insertions, 12 deletions
diff --git a/.travis.yml b/.travis.yml index 21918538..649959ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,9 @@ matrix: - env: TASK=CHECK_GIT_HISTORY + allow_failures: + - env: TASK=CHECK_GIT_HISTORY + before_install: - if \[ "$TASK" == "BUILD" \]; then mkdir -p $HOME/.gradle ; diff --git a/check-git-history.py b/check-git-history.py index fa9d350e..17fc7400 100644 --- a/check-git-history.py +++ b/check-git-history.py @@ -3,18 +3,14 @@ import sys import traceback def main(argv): - try: - # Only check the history if the build is running on a pull request. - if is_travis_pull_request(): - # This function assumes that HEAD^1 is the base branch and HEAD^2 is the - # pull request. - exit_if_pull_request_has_merge_commits() - print 'Checked pull request history.' - else: - print 'Skipped history check.' - except Exception as e: - # Don't stop the build if this script has a bug. - traceback.print_exc(e) + # Only check the history if the build is running on a pull request. + if is_travis_pull_request(): + # This function assumes that HEAD^1 is the base branch and HEAD^2 is the + # pull request. + exit_if_pull_request_has_merge_commits() + print 'Checked pull request history.' + else: + print 'Skipped history check.' def is_travis_pull_request(): '''Returns true if TRAVIS_PULL_REQUEST is set to indicate a pull request.''' |