From 4373aad1532a495402a7a3afb70c356b7aa399ba Mon Sep 17 00:00:00 2001 From: botantony Date: Wed, 7 May 2025 14:07:36 +0200 Subject: [PATCH] cask/dsl: set `no_autobump!` if `:extract_plist` livecheck strategy is used Signed-off-by: botantony --- Library/Homebrew/autobump_constants.rb | 1 + Library/Homebrew/cask/dsl.rb | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/Library/Homebrew/autobump_constants.rb b/Library/Homebrew/autobump_constants.rb index 15f6ed8ea5..d39f513dc4 100644 --- a/Library/Homebrew/autobump_constants.rb +++ b/Library/Homebrew/autobump_constants.rb @@ -5,4 +5,5 @@ NO_AUTOBUMP_REASONS_LIST = T.let({ incompatible_version_format: "incompatible version format", bumped_by_upstream: "bumped by upstream", + extract_plist: "livecheck uses `:extract_plist` strategy", }.freeze, T::Hash[Symbol, String]) diff --git a/Library/Homebrew/cask/dsl.rb b/Library/Homebrew/cask/dsl.rb index 5363e58237..d05d7a0058 100644 --- a/Library/Homebrew/cask/dsl.rb +++ b/Library/Homebrew/cask/dsl.rb @@ -161,6 +161,8 @@ module Cask @token = T.let(cask.token, String) @url = T.let(nil, T.nilable(URL)) @version = T.let(nil, T.nilable(DSL::Version)) + + set_no_autobump! end sig { returns(T::Boolean) } @@ -175,6 +177,12 @@ module Cask sig { returns(T::Boolean) } def livecheck_defined? = @livecheck_defined + def set_no_autobump! + return if @livecheck.strategy != :extract_plist + + no_autobump! because: :extract_plist + end + sig { returns(T::Boolean) } def on_system_blocks_exist? = @on_system_blocks_exist