diff options
| author | Mike McQuaid | 2016-07-15 13:19:44 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2016-07-15 13:19:44 +0100 |
| commit | 326039763276b2a38b8fcccea0be4a31493a6bda (patch) | |
| tree | 2fb9cfdf29bdb90ed51d4bebf3ca7d967aa8a9c9 /Library/Homebrew/dev-cmd | |
| parent | d34b93fa1c356f9dfe9a49e10c7aab0809997f1a (diff) | |
| download | brew-326039763276b2a38b8fcccea0be4a31493a6bda.tar.bz2 | |
test-bot: more reset/cleanup tweaks.
Diffstat (limited to 'Library/Homebrew/dev-cmd')
| -rw-r--r-- | Library/Homebrew/dev-cmd/test-bot.rb | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Library/Homebrew/dev-cmd/test-bot.rb b/Library/Homebrew/dev-cmd/test-bot.rb index 8781b1ec5..9e240ebb8 100644 --- a/Library/Homebrew/dev-cmd/test-bot.rb +++ b/Library/Homebrew/dev-cmd/test-bot.rb @@ -681,13 +681,13 @@ module Homebrew git "stash" git "am", "--abort" git "rebase", "--abort" - git "reset", "--hard" git "checkout", "-f", "master" + git "reset", "--hard", "origin/master" git "clean", "-ffdx" unless @repository == HOMEBREW_REPOSITORY HOMEBREW_REPOSITORY.cd do - safe_system "git", "reset", "--hard" safe_system "git", "checkout", "-f", "master" + safe_system "git", "reset", "--hard", "origin/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" @@ -710,16 +710,19 @@ module Homebrew end if ARGV.include? "--cleanup" - test "git", "reset", "--hard" + git "reset", "--hard", "origin/master" git "stash", "pop" test "brew", "cleanup", "--prune=7" git "gc", "--auto" test "git", "clean", "-ffdx" - HOMEBREW_REPOSITORY.cd do - safe_system "git", "reset", "--hard" - Tap.names.each { |s| safe_system "brew", "untap", s if s != "homebrew/core" } - safe_system "git", "clean", "-ffdx", "--exclude=/Library/Taps/" + unless @repository == HOMEBREW_REPOSITORY + HOMEBREW_REPOSITORY.cd do + safe_system "git", "reset", "--hard" + safe_system "git", "clean", "-ffdx", "--exclude=/Library/Taps/" + end end + Tap.names.each { |s| safe_system "brew", "untap", s if s != "homebrew/core" } + if ARGV.include? "--local" FileUtils.rm_rf ENV["HOMEBREW_HOME"] FileUtils.rm_rf ENV["HOMEBREW_LOGS"] |
