diff --git a/Library/Homebrew/cask/cask.rb b/Library/Homebrew/cask/cask.rb index c1bf04a6ff..4ce56d4011 100644 --- a/Library/Homebrew/cask/cask.rb +++ b/Library/Homebrew/cask/cask.rb @@ -373,6 +373,7 @@ module Cask "version" => version, "autobump" => autobump?, "no_autobump_message" => no_autobump_message, + "skip_livecheck" => livecheck.skip?, "installed" => installed_version, "installed_time" => install_time&.to_i, "bundle_version" => bundle_long_version, diff --git a/Library/Homebrew/dev-cmd/livecheck.rb b/Library/Homebrew/dev-cmd/livecheck.rb index 84675af729..dee478de47 100644 --- a/Library/Homebrew/dev-cmd/livecheck.rb +++ b/Library/Homebrew/dev-cmd/livecheck.rb @@ -100,10 +100,7 @@ module Homebrew 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 + autobump_lists[tap] ||= tap.autobump name = formula_or_cask.respond_to?(:token) ? formula_or_cask.token : formula_or_cask.name next unless autobump_lists[tap].include?(name) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 7a396fe8c0..9aab7c1671 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2500,6 +2500,7 @@ class Formula "version_scheme" => version_scheme, "autobump" => autobump?, "no_autobump_message" => no_autobump_message, + "skip_livecheck" => livecheck.skip?, "bottle" => {}, "pour_bottle_only_if" => self.class.pour_bottle_only_if&.to_s, "keg_only" => keg_only?, diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb index 808544c4dd..6bf7930732 100644 --- a/Library/Homebrew/tap.rb +++ b/Library/Homebrew/tap.rb @@ -20,8 +20,6 @@ class Tap private_constant :HOMEBREW_TAP_FORMULA_RENAMES_FILE HOMEBREW_TAP_MIGRATIONS_FILE = "tap_migrations.json" private_constant :HOMEBREW_TAP_MIGRATIONS_FILE - HOMEBREW_TAP_AUTOBUMP_FILE = ".github/autobump.txt" - private_constant :HOMEBREW_TAP_AUTOBUMP_FILE HOMEBREW_TAP_PYPI_FORMULA_MAPPINGS_FILE = "pypi_formula_mappings.json" private_constant :HOMEBREW_TAP_PYPI_FORMULA_MAPPINGS_FILE HOMEBREW_TAP_SYNCED_VERSIONS_FORMULAE_FILE = "synced_versions_formulae.json" @@ -985,10 +983,19 @@ class Tap # Array with autobump names sig { returns(T::Array[String]) } def autobump - @autobump ||= if (autobump_file = path/HOMEBREW_TAP_AUTOBUMP_FILE).file? - autobump_file.readlines(chomp: true) + unless official? + @autobump ||= [] + return @autobump + end + + @autobump ||= if core_cask_tap? + Homebrew::API::Cask.all_casks.select do |_, cask| + cask["autobump"] == true && !cask["skip_livecheck"] + end.keys else - [] + Homebrew::API::Formula.all_formulae.select do |_, formula| + formula["autobump"] == true && !formula["skip_livecheck"] + end.keys end end diff --git a/Library/Homebrew/tap_auditor.rb b/Library/Homebrew/tap_auditor.rb index a6fa8b307a..b270eedcdd 100644 --- a/Library/Homebrew/tap_auditor.rb +++ b/Library/Homebrew/tap_auditor.rb @@ -54,7 +54,6 @@ module Homebrew check_formula_list_directory "audit_exceptions", @tap_audit_exceptions check_formula_list_directory "style_exceptions", @tap_style_exceptions check_formula_list "pypi_formula_mappings", @tap_pypi_formula_mappings - check_formula_list ".github/autobump.txt", @tap_autobump check_formula_list "formula_renames", @formula_renames.values end