brew-test-bot: use Jenkins variables when no args.

Otherwise specifying arguments means that you can't effectively build just a single commit or pull request as Jenkins will try and override the start commit.
This commit is contained in:
Mike McQuaid 2013-09-14 12:34:56 +01:00
parent 7535ba3be4
commit 5d03149d81

View File

@ -165,7 +165,7 @@ class Test
@start_branch = current_branch
# Use Jenkins environment variables if present.
if ENV['GIT_PREVIOUS_COMMIT'] and ENV['GIT_COMMIT'] \
if no_args? and ENV['GIT_PREVIOUS_COMMIT'] and ENV['GIT_COMMIT'] \
and not ENV['ghprbPullId']
diff_start_sha1 = shorten_revision ENV['GIT_PREVIOUS_COMMIT']
diff_end_sha1 = shorten_revision ENV['GIT_COMMIT']