livecheck/strategy/sparkle: check minimumSystemVersion for compatibility

This commit is contained in:
Michael Cho 2021-06-17 16:30:52 -07:00 committed by Sam Ford
parent d305f7218f
commit 823dc28c21
No known key found for this signature in database
GPG Key ID: 95209E46C7FFDEFE

View File

@ -115,6 +115,16 @@ module Homebrew
next if os && os != "osx" next if os && os != "osx"
if OS.mac? && (minimum_system_version = (item > "minimumSystemVersion").first&.text&.strip)
macos_minimum_system_version = begin
MacOS::Version.new(minimum_system_version).strip_patch
rescue MacOSVersionError
nil
end
next if MacOS.version < macos_minimum_system_version
end
data = { data = {
title: title, title: title,
pub_date: pub_date || Time.new(0), pub_date: pub_date || Time.new(0),