aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2013-05-26 01:34:16 +0100
committerMike McQuaid2013-05-26 01:34:32 +0100
commit1856f8eadf68cb69195dac95ac79857485789b74 (patch)
tree035ab500c8cf281adf98b90ef0aab5334defef78 /Library
parent95ab813b35f32314296c70d91d3c11310d9da349 (diff)
downloadbrew-1856f8eadf68cb69195dac95ac79857485789b74.tar.bz2
brew-test-bot: shorten Jenkins env SHA-1s.
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Contributions/cmd/brew-test-bot.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/Library/Contributions/cmd/brew-test-bot.rb b/Library/Contributions/cmd/brew-test-bot.rb
index bcd949e0b..71d44d380 100755
--- a/Library/Contributions/cmd/brew-test-bot.rb
+++ b/Library/Contributions/cmd/brew-test-bot.rb
@@ -133,8 +133,12 @@ class Test
end
def download
+ def shorten_revision revision
+ git("rev-parse --short #{revision}").strip
+ end
+
def current_sha1
- git('rev-parse --short HEAD').strip
+ shorten_revision 'HEAD'
end
def current_branch
@@ -146,8 +150,8 @@ class Test
# Use Jenkins environment variables if present.
if ENV['GIT_PREVIOUS_COMMIT'] and ENV['GIT_COMMIT']
- diff_start_sha1 = ENV['GIT_PREVIOUS_COMMIT']
- diff_end_sha1 = ENV['GIT_COMMIT']
+ diff_start_sha1 = shorten_revision ENV['GIT_PREVIOUS_COMMIT']
+ diff_end_sha1 = shorten_revision ENV['GIT_COMMIT']
test "brew update" if current_branch == "master"
elsif @hash or @url
diff_start_sha1 = current_sha1