Skip to content

Commit

Permalink
garmin-express: update livecheck, add legacy version
Browse files Browse the repository at this point in the history
Co-authored-by: Sam Ford <[email protected]>
  • Loading branch information
khipp and samford committed Aug 10, 2024
1 parent 5093492 commit f5f67a7
Showing 1 changed file with 28 additions and 8 deletions.
36 changes: 28 additions & 8 deletions Casks/g/garmin-express.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,37 @@
cask "garmin-express" do
version "7.22.1.0,7220100"
sha256 :no_check
on_catalina :or_older do
version "7.18.0"
sha256 "f032349fa2b4cd5abe20ae9201c905874a4d3ef1b328966a29d24e6e15793729"

url "https://download.garmin.com/omt/express/GarminExpress_#{version}_OS10x.dmg"

livecheck do
skip "Legacy version"
end
end
on_big_sur :or_newer do
version "7.22.1"
sha256 :no_check

url "https://download.garmin.com/omt/express/GarminExpress.dmg"

# From https://support.garmin.com/en-US/?productID=168768&tab=software
livecheck do
url "https://support.garmin.com/capi/faq/details/?locale=en-US&faqId=9MuiEv9c2y2wgcXvzEVEe8"
regex(/for\s+Mac:?[\s\u00a0]*?v?(\d+(?:\.\d+)+)/i)
strategy :json do |json, regex|
match = json["content"]&.match(regex)
next if match.blank?

match[1]
end
end
end

url "https://download.garmin.com/omt/express/GarminExpress.dmg"
name "Garmin Express"
desc "Update maps and software, sync with Garmin Connect and register your device"
homepage "https://www.garmin.com/en-US/software/express"

livecheck do
url :url
strategy :extract_plist
end

auto_updates true

pkg "Install Garmin Express.pkg"
Expand Down

0 comments on commit f5f67a7

Please sign in to comment.