ExtractPlist: Add url to #find_versions object

This commit is contained in:
Sam Ford 2022-06-12 15:27:01 -04:00
parent 916c980676
commit 077fb350a5
No known key found for this signature in database
GPG Key ID: 7AF5CBEE1DD6F76D

View File

@ -82,6 +82,8 @@ module Homebrew
# versions from `plist` files. # versions from `plist` files.
# #
# @param cask [Cask::Cask] the cask to check for version information # @param cask [Cask::Cask] the cask to check for version information
# @param url [String, nil] an alternative URL to check for version
# information
# @param regex [Regexp, nil] a regex for use in a strategy block # @param regex [Regexp, nil] a regex for use in a strategy block
# @return [Hash] # @return [Hash]
sig { sig {
@ -99,7 +101,7 @@ module Homebrew
end end
raise ArgumentError, "The #{T.must(name).demodulize} strategy only supports casks." unless T.unsafe(cask) raise ArgumentError, "The #{T.must(name).demodulize} strategy only supports casks." unless T.unsafe(cask)
match_data = { matches: {}, regex: regex } match_data = { matches: {}, regex: regex, url: url }
if url && url != cask.url.to_s if url && url != cask.url.to_s
cask_object_for_livecheck = Cask::Cask.new("livecheck-cask", config: cask.config) do cask_object_for_livecheck = Cask::Cask.new("livecheck-cask", config: cask.config) do