Merge pull request #166959 from samford/batteryboi-update-livecheck

batteryboi: update livecheck
This commit is contained in:
Rui Chen
2024-02-17 12:33:22 +01:00
committed by GitHub
+8 -2
View File
@@ -9,8 +9,14 @@ cask "batteryboi" do
homepage "https://batteryboi.ovatar.io/"
livecheck do
url "https://api.ovatar.io/version?id=com.ovatar.batteryapp"
strategy :sparkle
url :url
regex(/^(?:Version[._-]?)?v?(\d+(?:\.\d+)+)(?:#(\d+))?$/i)
strategy :github_latest do |json, regex|
match = json["tag_name"]&.match(regex)
next if match.blank?
match[2].present? ? "#{match[1]},#{match[2]}" : match[1]
end
end
depends_on macos: ">= :big_sur"