aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Contributions
diff options
context:
space:
mode:
authorMike McQuaid2013-09-21 21:24:50 +0100
committerMike McQuaid2013-09-22 16:16:50 +0100
commit5d0f868f060c086cc53c81ef6a63ac93e24ae1b4 (patch)
tree037857904190f1d5f31f0f8570954ff961ecb62a /Library/Contributions
parentb2a983343b94d67c740fb273d14d68702ddc765b (diff)
downloadbrew-5d0f868f060c086cc53c81ef6a63ac93e24ae1b4.tar.bz2
Move bottle.rb logic from test-bot to brew bottle.
Diffstat (limited to 'Library/Contributions')
-rwxr-xr-xLibrary/Contributions/cmd/brew-test-bot.rb13
1 files changed, 4 insertions, 9 deletions
diff --git a/Library/Contributions/cmd/brew-test-bot.rb b/Library/Contributions/cmd/brew-test-bot.rb
index cbec69ad5..fb21b5ece 100755
--- a/Library/Contributions/cmd/brew-test-bot.rb
+++ b/Library/Contributions/cmd/brew-test-bot.rb
@@ -53,7 +53,7 @@ class Step
end
def command_short
- @command.gsub(/(brew|--force|--verbose|--build-bottle) /, '').strip.squeeze ' '
+ @command.gsub(/(brew|--force|--verbose|--build-bottle|--rb) /, '').strip.squeeze ' '
end
def passed?
@@ -276,16 +276,11 @@ class Test
test "brew audit #{formula}"
return unless install_passed
unless ARGV.include? '--no-bottle'
- test "brew bottle #{formula}", :puts_output_on_success => true
+ test "brew bottle --rb #{formula}", :puts_output_on_success => true
bottle_step = steps.last
if bottle_step.passed? and bottle_step.has_output?
- bottle_revision = bottle_new_revision(formula_object)
- bottle_filename = bottle_filename(formula_object, bottle_revision)
- bottle_base = bottle_filename.gsub(bottle_suffix(bottle_revision), '')
- bottle_output = bottle_step.output.gsub /.*(bottle do.*end)/m, '\1'
- File.open "#{bottle_base}.bottle.rb", 'w' do |file|
- file.write bottle_output
- end
+ bottle_filename =
+ bottle_step.output.gsub(/.*(\.\/\S+#{bottle_native_regex}).*/m, '\1')
test "brew uninstall --force #{formula}"
test "brew install #{bottle_filename}"
end