diff --git a/Casks/ui.rb b/Casks/ui.rb index 78abf8ba31b35..a8a20e88d58fd 100644 --- a/Casks/ui.rb +++ b/Casks/ui.rb @@ -1,6 +1,6 @@ cask "ui" do - version "0.56.3,79aba98f601b49818f3dae0e3d34b754,98a0" - sha256 "d2c338cf371af24f57d511e33b2bec995399d63d803d0fd258d8a2cbb0bcca9c" + version "0.56.3,b2d6dcc1ca1b470db93a710da52de392,b755" + sha256 "d3ce491d37b6aa184247359d1b4f1a5b2e48f6054f521a53d40f4de22b513884" url "https://fw-download.ubnt.com/data/uid-ui-desktop-app/#{version.csv.third}-macOS-#{version.csv.first}-#{version.csv.second}.pkg", verified: "fw-download.ubnt.com/data/uid-ui-desktop-app/" @@ -9,7 +9,14 @@ homepage "https://www.ui.com/uid" livecheck do - skip "No version information available" + url "https://api-gw.uid.alpha.ui.com:443/location/api/v1/public/fw/download/latest/?app=UI-DESKTOP-MACOS" + regex(/(\w+)[._-]macOS[._-](\d+(?:\.\d+)+)[._-](\w+)/i) + strategy :header_match do |headers, regex| + match = headers["location"].match(regex) + next if match.blank? + + "#{match[2]},#{match[3]},#{match[1]}" + end end depends_on macos: ">= :mojave"