tap: get autobump list from autobump.txt file

Signed-off-by: botantony <antonsm21@gmail.com>
This commit is contained in:
botantony 2025-05-09 15:21:21 +02:00
parent 6f39076b3c
commit 56d91aaf28
No known key found for this signature in database
GPG Key ID: 7FE721557EA6AAD6

View File

@ -985,19 +985,21 @@ class Tap
# Array with autobump names # Array with autobump names
sig { returns(T::Array[String]) } sig { returns(T::Array[String]) }
def autobump def autobump
autobump_packages = if core_cask_tap? # TODO: uncomment when official taps are prepared to use new autobump system
Homebrew::API::Cask.all_casks #
elsif core_tap? # autobump_packages = if core_cask_tap?
Homebrew::API::Formula.all_formulae # Homebrew::API::Cask.all_casks
else # elsif core_tap?
{} # Homebrew::API::Formula.all_formulae
end # else
# {}
# end
#
# @autobump ||= autobump_packages.select do |_, p|
# p["autobump"] == true && !p["skip_livecheck"] && !(p["deprecated"] || p["disabled"])
# end.keys
@autobump ||= autobump_packages.select do |_, p| if @autobump.blank?
p["autobump"] == true && !p["skip_livecheck"] && !(p["deprecated"] || p["disabled"])
end.keys
if @autobump.empty?
@autobump = if (autobump_file = path/HOMEBREW_TAP_AUTOBUMP_FILE).file? @autobump = if (autobump_file = path/HOMEBREW_TAP_AUTOBUMP_FILE).file?
autobump_file.readlines(chomp: true) autobump_file.readlines(chomp: true)
else else