test-bot: have --cleanup clean core repo as well as tested tap
Fixes Homebrew/homebrew#50651
This commit is contained in:
parent
232eccc428
commit
6283a274c8
@ -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"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user