test-bot: purge non-core taps at start/end of job (#109)
e70a3552d3 seems to have
exacerbated the problem where taps stick around and then `brew uses` gets executed
on a whole host of taps, which is currently breaking almost every PR for formulae
that would be used cross-tap, as well as causing lengthier CI builds.
Examples from the last week or so include sqlite, V8, protobuf, and so on. Whilst it
may be true that cross-tap formulae failing can show problems that need looking at,
a lot of the time the failures are unrelated to the build in question and just
leave contributors confused on what needs to be done, or why their PR is failing
for something that seems entirely unrelated.
You can see the taps failing to vanish locally by doing something like:
```
brew tap homebrew/fuse
brew tap homebrew/versions
cd $(brew --prefix) && git clean -ffdx --exclude=/Library/Taps/
brew tap
...
homebrew/core
homebrew/fuse
homebrew/versions
```
This is a very simple proposal to handle the problem, but there's no real reason
I couldn't write this functionality into untap itself and then we call that in
test-bot. Just didn't necessarily want to jump immediately to expanding the untap
command to solve what is more-or-less a CI problem.
This commit is contained in:
parent
acc9a7ca85
commit
46cfc9826c
@ -662,6 +662,7 @@ module Homebrew
|
||||
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
|
||||
Tap.names.each { |s| safe_system "brew", "untap", s if s != "homebrew/core" }
|
||||
safe_system "git", "clean", "-ffdx", "--exclude=/Library/Taps/" unless ENV["HOMEBREW_RUBY"] == "1.8.7"
|
||||
end
|
||||
pr_locks = "#{@repository}/.git/refs/remotes/*/pr/*/*.lock"
|
||||
@ -686,6 +687,7 @@ module Homebrew
|
||||
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/"
|
||||
end
|
||||
if ARGV.include? "--local"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user