cask/dsl: set no_autobump! if :extract_plist livecheck strategy is used

Signed-off-by: botantony <antonsm21@gmail.com>
This commit is contained in:
botantony 2025-05-07 14:07:36 +02:00
parent e5308b0245
commit 4373aad153
No known key found for this signature in database
GPG Key ID: 7FE721557EA6AAD6
2 changed files with 9 additions and 0 deletions

View File

@ -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])

View File

@ -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