From 00e58a88f3493832719004db2d388e32f2be2688 Mon Sep 17 00:00:00 2001 From: Sam Ford <1584702+samford@users.noreply.github.com> Date: Thu, 26 Oct 2023 09:47:29 -0400 Subject: [PATCH] qingg: update livecheck --- Casks/q/qingg.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Casks/q/qingg.rb b/Casks/q/qingg.rb index 2571951374..5564c40d4b 100644 --- a/Casks/q/qingg.rb +++ b/Casks/q/qingg.rb @@ -8,9 +8,18 @@ cask "qingg" do desc "Wubi input method" homepage "https://qingg.im/mac/" + # The `shortVersionString` value may contain additional text besides the + # numeric version (e.g., `2.15 十周年纪念版`), so we match the version from + # the URL in this instance. livecheck do url "https://qingg.im/sparkle/appcast.php" - strategy :sparkle, &:short_version + regex(/Qingg[._-]v?(\d+(?:\.\d+)+)\.(?:dmg|pkg|zip)/i) + strategy :sparkle do |item| + match = item&.url&.match(regex) + next if match.blank? + + match[1] + end end auto_updates true