diff options
| author | Mike McQuaid | 2014-02-23 10:34:22 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2014-02-23 10:34:22 +0000 |
| commit | 690060578c16f9837ae2eb55d5eddb6bea51ed04 (patch) | |
| tree | 5f8b7f629fcdfb4635f2ab4b0a8dea29ea059bc3 /Library | |
| parent | 85feea33c003748740f3a3dc1e410549afa50e95 (diff) | |
| download | brew-690060578c16f9837ae2eb55d5eddb6bea51ed04.tar.bz2 | |
brew-test-bot: further tweak cleanup handling.
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Contributions/cmd/brew-test-bot.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Library/Contributions/cmd/brew-test-bot.rb b/Library/Contributions/cmd/brew-test-bot.rb index 5563a55e5..cfb3b233d 100755 --- a/Library/Contributions/cmd/brew-test-bot.rb +++ b/Library/Contributions/cmd/brew-test-bot.rb @@ -5,6 +5,7 @@ # Options: # --keep-logs: Write and keep log files under ./brewbot/ # --cleanup: Clean the Homebrew directory. Very dangerous. Use with care. +# --clean-cache: Remove all cached downloads. Use with care. # --skip-setup: Don't check the local system is setup correctly. # --junit: Generate a JUnit XML test results file. # --email: Generate an email subject file. @@ -329,7 +330,7 @@ class Test git 'am --abort 2>/dev/null' git 'rebase --abort 2>/dev/null' git 'reset --hard' - git 'checkout -f master' + git 'checkout -f master 2>/dev/null' git 'clean --force -dx' end @@ -348,6 +349,7 @@ class Test if ARGV.include? '--cleanup' test 'git reset --hard' git 'stash pop 2>/dev/null' + test 'brew cleanup' end FileUtils.rm_rf @brewbot_root unless ARGV.include? "--keep-logs" @@ -525,9 +527,7 @@ if ARGV.include? "--email" end end -if ARGV.include? "--cleanup" - safe_system "brew cleanup -s" - safe_system "rm -vrf #{HOMEBREW_CACHE}/*" -end + +safe_system "rm -rf #{HOMEBREW_CACHE}/*" if ARGV.include? "--clean-cache" exit any_errors ? 0 : 1 |
