Skip to content

Commit

Permalink
Merge pull request Homebrew#1100 from MikeMcQuaid/test-bot-etc-var
Browse files Browse the repository at this point in the history
test-bot: cleanup etc/var after each build.
  • Loading branch information
MikeMcQuaid committed Sep 23, 2016
2 parents 81e325c + 28a3cec commit 8724e11
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Library/Homebrew/dev-cmd/test-bot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ def homebrew
end
end

def cleanup_git
def cleanup_shared
git "gc", "--auto"
test "git", "clean", "-ffdx", "--exclude=Library/Taps"

Expand All @@ -754,8 +754,8 @@ def cleanup_git
safe_system "brew", "untap", tap
end

Formula.installed.each do |formula|
safe_system "brew", "uninstall", "--force", formula
Dir.glob("#{HOMEBREW_PREFIX}/{Cellar,etc,var}/**/*").each do |file|
FileUtils.rm_rf file
end
safe_system "brew", "prune"

Expand Down Expand Up @@ -787,7 +787,7 @@ def cleanup_before
git "reset", "--hard", "origin/master"
end

cleanup_git
cleanup_shared

pr_locks = "#{@repository}/.git/refs/remotes/*/pr/*/*.lock"
Dir.glob(pr_locks) { |lock| FileUtils.rm_rf lock }
Expand All @@ -808,7 +808,7 @@ def cleanup_after
git "stash", "pop"
test "brew", "cleanup", "--prune=7"

cleanup_git
cleanup_shared

if ARGV.include? "--local"
FileUtils.rm_rf ENV["HOMEBREW_HOME"]
Expand Down

0 comments on commit 8724e11

Please sign in to comment.