From 72666b857b54e1b866ca52613f385c16d09e1af4 Mon Sep 17 00:00:00 2001 From: Sam Ford <1584702+samford@users.noreply.github.com> Date: Wed, 11 Mar 2026 17:26:56 -0400 Subject: [PATCH] Formula, Cask: add livecheck_defined hash value The `Tap.autobump` logic was recently updated to not skip deprecated packages but this has lead to autobump checking packages that livecheck will automatically skip as deprecated. We want autobump to only check deprecated packages that are checkable and that effectively means only checking those with a `livecheck` block. To be able to do this, we need to include the `livecheck_defined?` value in the JSON API data for formulae and casks. This adds a `livecheck_defined` value to `Cask#to_h` and `Formula#to_hash` as a preliminary step. We need to add this value and for it to be present in the latest JSON API data before we can use it in `Tap.autobump`. --- Library/Homebrew/cask/cask.rb | 1 + Library/Homebrew/formula.rb | 1 + Library/Homebrew/test/support/fixtures/cask/everything.json | 1 + 3 files changed, 3 insertions(+) diff --git a/Library/Homebrew/cask/cask.rb b/Library/Homebrew/cask/cask.rb index 295f69e8048a9..db0a7ccae2786 100644 --- a/Library/Homebrew/cask/cask.rb +++ b/Library/Homebrew/cask/cask.rb @@ -425,6 +425,7 @@ def to_h "version" => version, "autobump" => autobump?, "no_autobump_message" => no_autobump_message, + "livecheck_defined" => livecheck_defined?, "skip_livecheck" => livecheck.skip?, "installed" => installed_version, "installed_time" => install_time&.to_i, diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 625d7a7574400..3631f33c61924 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2864,6 +2864,7 @@ def to_hash "compatibility_version" => compatibility_version, "autobump" => autobump?, "no_autobump_message" => no_autobump_message, + "livecheck_defined" => livecheck_defined?, "skip_livecheck" => livecheck.skip?, "bottle" => {}, "pour_bottle_only_if" => self.class.pour_bottle_only_if&.to_s, diff --git a/Library/Homebrew/test/support/fixtures/cask/everything.json b/Library/Homebrew/test/support/fixtures/cask/everything.json index c3163162f8bc0..1a73626669677 100644 --- a/Library/Homebrew/test/support/fixtures/cask/everything.json +++ b/Library/Homebrew/test/support/fixtures/cask/everything.json @@ -18,6 +18,7 @@ "version": "1.2.3", "autobump": true, "no_autobump_message": null, + "livecheck_defined": false, "skip_livecheck": false, "installed": null, "installed_time": null,