test-bot: cleanup old PR locks.

This is a problem on older versions of Git (such as on the Mountain Lion bot).
This commit is contained in:
Mike McQuaid 2015-02-27 13:53:29 +00:00
parent b9790ffe3a
commit 307ea17ba3

View File

@ -513,6 +513,8 @@ module Homebrew
git "checkout", "-f", "master"
git "clean", "-fdx"
git "clean", "-ffdx" unless $?.success?
pr_locks = "#{HOMEBREW_REPOSITORY}/.git/refs/remotes/*/pr/*/head.lock"
Dir.glob(pr_locks) {|lock| FileUtils.rm_rf lock }
end
def cleanup_after