cask: audit if sparkle livecheck needs multipart version

This commit is contained in:
Sean Molenaar 2023-02-21 17:02:01 +01:00
parent 6b7ecd18e9
commit 8806178cf3
No known key found for this signature in database
GPG Key ID: AAC1C7E1A4696A9A

View File

@ -474,6 +474,16 @@ module Cask
add_error "download not possible: #{e}"
end
sig { void }
def audit_appcast_unneeded_long_version
return unless cask.livecheck.strategy == :sparkle
return unless cask.version.csv.second
return if cask.url.to_s.include? cask.version.csv.second
return if cask.url.to_s.include? cask.version.csv.third
add_warning "Download does not require additional version components. Use `&:short_version` in the livecheck"
end
sig { void }
def audit_signing
return if !signing? || download.blank? || cask.url.blank?