diff options
| -rw-r--r-- | Library/Homebrew/cmd/test-bot.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/test-bot.rb b/Library/Homebrew/cmd/test-bot.rb index a594199fb..78e938ed7 100644 --- a/Library/Homebrew/cmd/test-bot.rb +++ b/Library/Homebrew/cmd/test-bot.rb @@ -639,7 +639,14 @@ module Homebrew git "rebase", "--abort" git "reset", "--hard" git "checkout", "-f", "master" - git "clean", "-ffdx" unless ENV["HOMEBREW_RUBY"] == "1.8.7" + 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" unless ENV["HOMEBREW_RUBY"] == "1.8.7" + end pr_locks = "#{@repository}/.git/refs/remotes/*/pr/*/*.lock" Dir.glob(pr_locks) { |lock| FileUtils.rm_rf lock } end @@ -660,6 +667,10 @@ module Homebrew test "brew", "cleanup", "--prune=7" git "gc", "--auto" test "git", "clean", "-ffdx" + HOMEBREW_REPOSITORY.cd do + safe_system "git", "reset", "--hard" + safe_system "git", "clean", "-ffdx" + end if ARGV.include? "--local" FileUtils.rm_rf ENV["HOMEBREW_HOME"] FileUtils.rm_rf ENV["HOMEBREW_LOGS"] |
