mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
dev-cmd/bump: suggestions from MikeMcQuaid
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com> Signed-off-by: botantony <antonsm21@gmail.com>
This commit is contained in:
parent
e3875f790e
commit
aa86fcc9b3
@ -33,7 +33,7 @@ module Homebrew
|
|||||||
switch "--auto",
|
switch "--auto",
|
||||||
description: "Read the list of formulae/casks from the tap autobump list.",
|
description: "Read the list of formulae/casks from the tap autobump list.",
|
||||||
hidden: true
|
hidden: true
|
||||||
switch "--no-auto",
|
switch "--no-autobump",
|
||||||
description: "Ignore formulae/casks in autobump list (official repositories only)."
|
description: "Ignore formulae/casks in autobump list (official repositories only)."
|
||||||
switch "--formula", "--formulae",
|
switch "--formula", "--formulae",
|
||||||
description: "Check only formulae."
|
description: "Check only formulae."
|
||||||
@ -72,12 +72,10 @@ module Homebrew
|
|||||||
eval_all = args.eval_all? || Homebrew::EnvConfig.eval_all?
|
eval_all = args.eval_all? || Homebrew::EnvConfig.eval_all?
|
||||||
|
|
||||||
excluded_autobump = []
|
excluded_autobump = []
|
||||||
if args.no_auto?
|
if args.no_autobump?
|
||||||
if eval_all || args.formula?
|
excluded_autobump.concat(autobumped_formulae_or_casks(CoreTap.instance)) if eval_all || args.formula?
|
||||||
excluded_autobump.concat autobumped_formulae_or_casks Tap.fetch("homebrew/core")
|
|
||||||
end
|
|
||||||
if eval_all || args.cask?
|
if eval_all || args.cask?
|
||||||
excluded_autobump.concat autobumped_formulae_or_casks Tap.fetch("homebrew/cask"), casks: true
|
excluded_autobump.concat(autobumped_formulae_or_casks(CoreCaskTap.instance, casks: true))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -132,7 +130,7 @@ module Homebrew
|
|||||||
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
|
||||||
|
|
||||||
formulae_and_casks.delete_if { |f_or_c| excluded_autobump.include?(f_or_c) }
|
formulae_and_casks -= excluded_autobump
|
||||||
|
|
||||||
if args.repology? && !Utils::Curl.curl_supports_tls13?
|
if args.repology? && !Utils::Curl.curl_supports_tls13?
|
||||||
begin
|
begin
|
||||||
@ -562,9 +560,11 @@ module Homebrew
|
|||||||
autobump_list = tap.autobump
|
autobump_list = tap.autobump
|
||||||
autobump_list.map do |name|
|
autobump_list.map do |name|
|
||||||
qualified_name = "#{tap.name}/#{name}"
|
qualified_name = "#{tap.name}/#{name}"
|
||||||
next Cask::CaskLoader.load(qualified_name) if casks
|
if casks
|
||||||
|
Cask::CaskLoader.load(qualified_name)
|
||||||
Formulary.factory(qualified_name)
|
else
|
||||||
|
Formulary.factory(qualified_name)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -18,7 +18,7 @@ class Homebrew::DevCmd::Bump::Args < Homebrew::CLI::Args
|
|||||||
# didn't work for me for some reason, adding `no_auto?` flag manually.
|
# didn't work for me for some reason, adding `no_auto?` flag manually.
|
||||||
# If you can help me with fixing the issue or `tapioca` runs perfectly, please, override this
|
# If you can help me with fixing the issue or `tapioca` runs perfectly, please, override this
|
||||||
sig { returns(T::Boolean) }
|
sig { returns(T::Boolean) }
|
||||||
def no_auto?; end
|
def no_autobump?; end
|
||||||
|
|
||||||
sig { returns(T::Boolean) }
|
sig { returns(T::Boolean) }
|
||||||
def cask?; end
|
def cask?; end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user