aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2013-12-10 20:52:11 +0000
committerMike McQuaid2013-12-10 20:52:11 +0000
commitfea5fcf25ba54c3f0f895cc82087ebc400f7e0da (patch)
tree4096dab79e5e5226711b16567a5f82e980df381c /Library
parentb1331e62b1cc6ae7ed71ad70bfc3d5e18efccdf2 (diff)
downloadbrew-fea5fcf25ba54c3f0f895cc82087ebc400f7e0da.tar.bz2
brew-test-bot: change upload job approach.
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Contributions/cmd/brew-test-bot.rb59
1 files changed, 28 insertions, 31 deletions
diff --git a/Library/Contributions/cmd/brew-test-bot.rb b/Library/Contributions/cmd/brew-test-bot.rb
index 5b7b2d330..a220e2c0b 100755
--- a/Library/Contributions/cmd/brew-test-bot.rb
+++ b/Library/Contributions/cmd/brew-test-bot.rb
@@ -374,41 +374,14 @@ class Test
def run
cleanup_before
download
- if ARGV.include? '--ci-pr-upload' or ARGV.include? '--ci-testing-upload'
- bottle_upload
- else
- setup
- homebrew
- formulae.each do |f|
- formula(f)
- end
+ setup
+ homebrew
+ formulae.each do |f|
+ formula(f)
end
cleanup_after
check_results
end
-
- def bottle_upload
- @category = __method__
- jenkins = ENV['JENKINS_HOME']
- job = ENV['UPSTREAM_JOB_NAME']
- id = ENV['UPSTREAM_BUILD_ID']
- raise "Missing Jenkins variables!" unless jenkins and job and id
-
- test "cp #{jenkins}/jobs/\"#{job}\"/configurations/axis-version/*/builds/#{id}/archive/*.bottle*.* ."
- test "brew bottle --merge --write *.bottle*.rb"
-
- remote = "git@github.com:BrewTestBot/homebrew.git"
- pr = ENV['UPSTREAM_PULL_REQUEST']
- tag = pr ? "pr-#{pr}" : "testing-#{id}"
- test "git push --force #{remote} :refs/tags/#{tag}"
-
- path = "/home/frs/project/m/ma/machomebrew/Bottles/"
- url = "BrewTestBot,machomebrew@frs.sourceforge.net:#{path}"
- options = "--partial --progress --human-readable --compress"
- test "rsync #{options} *.bottle.tar.gz #{url}"
- test "git tag --force #{tag}"
- test "git push --force #{remote} refs/tags/#{tag}"
- end
end
if Pathname.pwd == HOMEBREW_PREFIX and ARGV.include? "--cleanup"
@@ -437,6 +410,30 @@ if ARGV.include? '--local'
ENV['HOMEBREW_LOGS'] = "#{Dir.pwd}/logs"
end
+if ARGV.include? '--ci-pr-upload' or ARGV.include? '--ci-testing-upload'
+ jenkins = ENV['JENKINS_HOME']
+ job = ENV['UPSTREAM_JOB_NAME']
+ id = ENV['UPSTREAM_BUILD_ID']
+ raise "Missing Jenkins variables!" unless jenkins and job and id
+
+ ARGV << '--verbose'
+ safe_system "cp #{jenkins}/jobs/\"#{job}\"/configurations/axis-version/*/builds/#{id}/archive/*.bottle*.* ."
+ safe_system "brew bottle --merge --write *.bottle*.rb"
+
+ remote = "git@github.com:BrewTestBot/homebrew.git"
+ pr = ENV['UPSTREAM_PULL_REQUEST']
+ tag = pr ? "pr-#{pr}" : "testing-#{id}"
+ safe_system "git push --force #{remote} :refs/tags/#{tag}"
+
+ path = "/home/frs/project/m/ma/machomebrew/Bottles/"
+ url = "BrewTestBot,machomebrew@frs.sourceforge.net:#{path}"
+ options = "--partial --progress --human-readable --compress"
+ safe_system "rsync #{options} *.bottle.tar.gz #{url}"
+ safe_system "git tag --force #{tag}"
+ safe_system "git push --force #{remote} refs/tags/#{tag}"
+ exit 0
+end
+
tests = []
any_errors = false
if ARGV.named.empty?