brew-test-bot: further tweak pull request handling.

This commit is contained in:
Mike McQuaid 2013-06-15 11:15:31 +01:00
parent 52a935d5bc
commit 43b85e5865

View File

@ -152,7 +152,8 @@ class Test
@start_branch = current_branch @start_branch = current_branch
# Use Jenkins environment variables if present. # Use Jenkins environment variables if present.
if ENV['GIT_PREVIOUS_COMMIT'] and ENV['GIT_COMMIT'] if ENV['GIT_PREVIOUS_COMMIT'] and ENV['GIT_COMMIT'] \
and not ENV['ghprbPullId']
diff_start_sha1 = shorten_revision ENV['GIT_PREVIOUS_COMMIT'] diff_start_sha1 = shorten_revision ENV['GIT_PREVIOUS_COMMIT']
diff_end_sha1 = shorten_revision ENV['GIT_COMMIT'] diff_end_sha1 = shorten_revision ENV['GIT_COMMIT']
test "brew update" if current_branch == "master" test "brew update" if current_branch == "master"
@ -171,6 +172,8 @@ class Test
pull_id = ENV['ghprbPullId'] pull_id = ENV['ghprbPullId']
@url = "https://github.com/#{github_repo}/pull/#{pull_id}" @url = "https://github.com/#{github_repo}/pull/#{pull_id}"
@hash = nil @hash = nil
else
puts "Invalid 'ghprbPullId' environment variable value!"
end end
end end