Alphabetical envvars; better variable names; just the one loop
This commit is contained in:
parent
296c2b9f3f
commit
ce562c312b
@ -93,24 +93,19 @@ module Homebrew
|
||||
end
|
||||
|
||||
if skip_autobump?
|
||||
autobump_files = {}
|
||||
|
||||
formulae_and_casks_to_check.each do |formula_or_cask|
|
||||
tap = formula_or_cask.tap
|
||||
next if tap.nil?
|
||||
|
||||
autobump_files[tap] ||= begin
|
||||
autobump_path = tap.path/".github/autobump.txt"
|
||||
autobump_path.exist? ? File.read(autobump_path).lines.map(&:strip) : []
|
||||
end
|
||||
end
|
||||
autobump_lists = {}
|
||||
|
||||
formulae_and_casks_to_check = formulae_and_casks_to_check.reject do |formula_or_cask|
|
||||
tap = formula_or_cask.tap
|
||||
next false if tap.nil?
|
||||
|
||||
autobump_lists[tap] ||= begin
|
||||
autobump_path = tap.path/".github/autobump.txt"
|
||||
autobump_path.exist? ? autobump_path.readlines.map(&:strip) : []
|
||||
end
|
||||
|
||||
name = formula_or_cask.respond_to?(:token) ? formula_or_cask.token : formula_or_cask.name
|
||||
if autobump_files[tap].include?(name)
|
||||
if autobump_lists[tap].include?(name)
|
||||
odebug "Skipping #{name} as it is autobumped in #{tap}."
|
||||
true
|
||||
end
|
||||
|
@ -296,6 +296,10 @@ module Homebrew
|
||||
default_text: 'The "Beer Mug" emoji.',
|
||||
default: "🍺",
|
||||
},
|
||||
HOMEBREW_LIVECHECK_AUTOBUMP: {
|
||||
description: "If set, `brew livecheck` will include data for packages that are autobumped by BrewTestBot.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_LIVECHECK_WATCHLIST: {
|
||||
description: "Consult this file for the list of formulae to check by default when no formula argument " \
|
||||
"is passed to `brew livecheck`.",
|
||||
@ -303,10 +307,6 @@ module Homebrew
|
||||
"or `$HOME/.homebrew/livecheck_watchlist.txt` otherwise.",
|
||||
default: "#{ENV.fetch("HOMEBREW_USER_CONFIG_HOME")}/livecheck_watchlist.txt",
|
||||
},
|
||||
HOMEBREW_LIVECHECK_AUTOBUMP: {
|
||||
description: "If set, `brew livecheck` will include data for packages that are autobumped by BrewTestBot.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_LOCK_CONTEXT: {
|
||||
description: "If set, Homebrew will add this output as additional context for locking errors. " \
|
||||
"This is useful when running `brew` in the background.",
|
||||
|
Loading…
x
Reference in New Issue
Block a user