diff options
| author | Andrew Janke | 2016-04-03 00:58:53 -0400 | 
|---|---|---|
| committer | Xu Cheng | 2016-04-03 14:31:12 +0800 | 
| commit | 6283a274c871dfd5a63c17311a2b7eb346c047d7 (patch) | |
| tree | b636c2a65f18395d44e8738ccb6fe4851b4e3454 | |
| parent | 232eccc4285712697d66f72bd39fa196b5ba1f98 (diff) | |
| download | brew-6283a274c871dfd5a63c17311a2b7eb346c047d7.tar.bz2 | |
test-bot: have --cleanup clean core repo as well as tested tap
Fixes Homebrew/homebrew#50651
| -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"] | 
