dev-cmd/livecheck: Skip autobumped formulae
- Skip formulae that are autobumped by BrewTestBot, to avoid useless effort spent by contributors who are checking for formulae to bump and then we close their PRs.
This commit is contained in:
parent
f2ce1318b3
commit
3f976ec0c2
@ -14,7 +14,7 @@ module Homebrew
|
|||||||
Check for newer versions of formulae and/or casks from upstream.
|
Check for newer versions of formulae and/or casks from upstream.
|
||||||
If no formula or cask argument is passed, the list of formulae and
|
If no formula or cask argument is passed, the list of formulae and
|
||||||
casks to check is taken from `HOMEBREW_LIVECHECK_WATCHLIST` or
|
casks to check is taken from `HOMEBREW_LIVECHECK_WATCHLIST` or
|
||||||
`~/.homebrew/livecheck_watchlist.txt`.
|
`~/.homebrew/livecheck_watchlist.txt`, excluding autobumped formulae.
|
||||||
EOS
|
EOS
|
||||||
switch "--full-name",
|
switch "--full-name",
|
||||||
description: "Print formulae and casks with fully-qualified names."
|
description: "Print formulae and casks with fully-qualified names."
|
||||||
@ -90,6 +90,19 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Skip formulae that are autobumped by BrewTestBot.
|
||||||
|
formulae_and_casks_to_check = formulae_and_casks_to_check.reject do |formula_or_cask|
|
||||||
|
next false if formula_or_cask.respond_to?(:token) # Only formulae are autobumped.
|
||||||
|
|
||||||
|
autobump_file = formula_or_cask.tap.path/".github/autobump.txt"
|
||||||
|
next false unless File.exist?(autobump_file)
|
||||||
|
|
||||||
|
if File.read(autobump_file).include?(formula_or_cask.name)
|
||||||
|
odebug "Skipping #{formula_or_cask.name} as it is autobumped."
|
||||||
|
true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
formulae_and_casks_to_check = formulae_and_casks_to_check.sort_by do |formula_or_cask|
|
formulae_and_casks_to_check = formulae_and_casks_to_check.sort_by do |formula_or_cask|
|
||||||
formula_or_cask.respond_to?(:token) ? formula_or_cask.token : formula_or_cask.name
|
formula_or_cask.respond_to?(:token) ? formula_or_cask.token : formula_or_cask.name
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user