dev-cmd/bump: skip head-only & disabled formulae
This commit is contained in:
parent
6235a7f1af
commit
7c707216a2
@ -126,10 +126,7 @@ module Homebrew
|
|||||||
use_full_name = args.full_name? || ambiguous_names.include?(formula_or_cask)
|
use_full_name = args.full_name? || ambiguous_names.include?(formula_or_cask)
|
||||||
name = Livecheck.package_or_resource_name(formula_or_cask, full_name: use_full_name)
|
name = Livecheck.package_or_resource_name(formula_or_cask, full_name: use_full_name)
|
||||||
repository = if formula_or_cask.is_a?(Formula)
|
repository = if formula_or_cask.is_a?(Formula)
|
||||||
if formula_or_cask.head_only?
|
next if skip_ineligible_formulae(formula_or_cask)
|
||||||
puts "Formula is HEAD-only."
|
|
||||||
next
|
|
||||||
end
|
|
||||||
|
|
||||||
Repology::HOMEBREW_CORE
|
Repology::HOMEBREW_CORE
|
||||||
else
|
else
|
||||||
@ -201,6 +198,8 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
puts if i.positive?
|
puts if i.positive?
|
||||||
|
next if formula_or_cask.is_a?(Formula) && skip_ineligible_formulae(formula_or_cask)
|
||||||
|
|
||||||
retrieve_and_display_info_and_open_pr(
|
retrieve_and_display_info_and_open_pr(
|
||||||
formula_or_cask,
|
formula_or_cask,
|
||||||
name,
|
name,
|
||||||
@ -212,6 +211,17 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
sig {
|
||||||
|
params(formula: Formula).returns(T::Boolean)
|
||||||
|
}
|
||||||
|
def skip_ineligible_formulae(formula)
|
||||||
|
return false if !formula.disabled? && !formula.head_only?
|
||||||
|
|
||||||
|
ohai formula.name
|
||||||
|
puts "Formula is #{formula.disabled? ? "disabled" : "HEAD-only"}.\n"
|
||||||
|
true
|
||||||
|
end
|
||||||
|
|
||||||
sig {
|
sig {
|
||||||
params(formula_or_cask: T.any(Formula, Cask::Cask)).returns(T.any(Version, String))
|
params(formula_or_cask: T.any(Formula, Cask::Cask)).returns(T.any(Version, String))
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user