From e33d3e1e5ca69b7ea61d0e2ee8f691530146cf1a Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 17 Jul 2013 22:08:57 -0700 Subject: [PATCH] brew-test-bot: only install bottle if created OK. --- Library/Contributions/cmd/brew-test-bot.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/Contributions/cmd/brew-test-bot.rb b/Library/Contributions/cmd/brew-test-bot.rb index 5ef11db691..070955c8b4 100755 --- a/Library/Contributions/cmd/brew-test-bot.rb +++ b/Library/Contributions/cmd/brew-test-bot.rb @@ -268,18 +268,18 @@ class Test test "brew audit #{formula}" return unless install_passed test "brew bottle #{formula}", :puts_output_on_success => true - bottle_revision = bottle_new_revision(formula_object) - bottle_filename = bottle_filename(formula_object, bottle_revision) 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 + test "brew uninstall --force #{formula}" + test "brew install #{bottle_filename}" end - test "brew uninstall --force #{formula}" - test "brew install #{bottle_filename}" test "brew test #{formula}" if formula_object.test_defined? test "brew uninstall --force #{formula}" test "brew uninstall --force #{dependencies}" unless dependencies.empty?