diff options
| author | Mike McQuaid | 2016-07-15 13:10:39 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2016-07-15 13:10:39 +0100 |
| commit | ec1da60941ec68fd4730519d0e44704aa55a3dce (patch) | |
| tree | 9351d1df5e4609611b48d6d7e2b2277052e43157 | |
| parent | 3995d237dd8e6d543c3164b4887b7225b980f31e (diff) | |
| download | brew-ec1da60941ec68fd4730519d0e44704aa55a3dce.tar.bz2 | |
test-bot: don't cleanup brew repo twice.
| -rw-r--r-- | Library/Homebrew/dev-cmd/test-bot.rb | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Library/Homebrew/dev-cmd/test-bot.rb b/Library/Homebrew/dev-cmd/test-bot.rb index 7a9819dfa..69fa1bd18 100644 --- a/Library/Homebrew/dev-cmd/test-bot.rb +++ b/Library/Homebrew/dev-cmd/test-bot.rb @@ -683,12 +683,16 @@ module Homebrew git "reset", "--hard" git "checkout", "-f", "master" git "clean", "-ffdx" - HOMEBREW_REPOSITORY.cd do - safe_system "git", "reset", "--hard" - safe_system "git", "checkout", "-f", "master" - # This will uninstall all formulae, as long as - # HOMEBREW_REPOSITORY == HOMEBREW_PREFIX, which is true on the test bots - safe_system "git", "clean", "-ffdx", "--exclude=/Library/Taps/" unless ENV["HOMEBREW_RUBY"] == "1.8.7" + unless @repository == HOMEBREW_REPOSITORY + HOMEBREW_REPOSITORY.cd do + safe_system "git", "reset", "--hard" + safe_system "git", "checkout", "-f", "master" + # This will uninstall all formulae, as long as + # HOMEBREW_REPOSITORY == HOMEBREW_PREFIX, which is true on the test bots + unless ENV["HOMEBREW_RUBY"] == "1.8.7" + safe_system "git", "clean", "-ffdx", "--exclude=/Library/Taps/" + end + end end pr_locks = "#{@repository}/.git/refs/remotes/*/pr/*/*.lock" Dir.glob(pr_locks) { |lock| FileUtils.rm_rf lock } |
