Merge pull request #16004 from EricFromCanada/bump-reduce-output

dev-cmd/bump: reduce unnecessary output
This commit is contained in:
Mike McQuaid 2023-09-14 15:24:33 +01:00 committed by GitHub
commit b2cf50bbe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -126,10 +126,7 @@ module Homebrew
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)
repository = if formula_or_cask.is_a?(Formula)
if formula_or_cask.head_only?
puts "Formula is HEAD-only."
next
end
next if skip_ineligible_formulae(formula_or_cask)
Repology::HOMEBREW_CORE
else
@ -201,6 +198,8 @@ module Homebrew
end
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(
formula_or_cask,
name,
@ -212,6 +211,17 @@ module Homebrew
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 {
params(formula_or_cask: T.any(Formula, Cask::Cask)).returns(T.any(Version, String))
}
@ -436,6 +446,8 @@ module Homebrew
Current #{version_label} #{current_versions}
Latest livecheck version: #{new_versions}
Latest Repology version: #{repology_latest}
EOS
puts <<~EOS unless args.no_pull_requests?
Open pull requests: #{open_pull_requests || "none"}
Closed pull requests: #{closed_pull_requests || "none"}
EOS