aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMike McQuaid2016-07-15 13:10:39 +0100
committerMike McQuaid2016-07-15 13:10:39 +0100
commitec1da60941ec68fd4730519d0e44704aa55a3dce (patch)
tree9351d1df5e4609611b48d6d7e2b2277052e43157 /Library/Homebrew
parent3995d237dd8e6d543c3164b4887b7225b980f31e (diff)
downloadbrew-ec1da60941ec68fd4730519d0e44704aa55a3dce.tar.bz2
test-bot: don't cleanup brew repo twice.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/dev-cmd/test-bot.rb16
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 }