Merge pull request #19998 from botantony/extract-plist-no-autobump

cask/dsl: set `no_autobump!` if livecheck uses `:extract_plist`
This commit is contained in:
Mike McQuaid 2025-05-22 09:17:39 +00:00 committed by GitHub
commit 8d30251f9f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -161,8 +161,6 @@ module Cask
@token = T.let(cask.token, String) @token = T.let(cask.token, String)
@url = T.let(nil, T.nilable(URL)) @url = T.let(nil, T.nilable(URL))
@version = T.let(nil, T.nilable(DSL::Version)) @version = T.let(nil, T.nilable(DSL::Version))
set_no_autobump!
end end
sig { returns(T::Boolean) } sig { returns(T::Boolean) }
@ -177,13 +175,6 @@ module Cask
sig { returns(T::Boolean) } sig { returns(T::Boolean) }
def livecheck_defined? = @livecheck_defined def livecheck_defined? = @livecheck_defined
sig { void }
def set_no_autobump!
return if @livecheck.strategy != :extract_plist
no_autobump! because: :extract_plist
end
sig { returns(T::Boolean) } sig { returns(T::Boolean) }
def on_system_blocks_exist? = @on_system_blocks_exist def on_system_blocks_exist? = @on_system_blocks_exist
@ -547,6 +538,8 @@ module Cask
@livecheck_defined = true @livecheck_defined = true
@livecheck.instance_eval(&block) @livecheck.instance_eval(&block)
no_autobump! because: :extract_plist if @livecheck.strategy == :extract_plist
@livecheck
end end
# Whether the cask contains a `livecheck` block. This is a legacy alias # Whether the cask contains a `livecheck` block. This is a legacy alias