batteryboi: update livecheck

This commit is contained in:
Sam Ford 2024-02-16 13:45:33 -05:00
parent c75ab6c02e
commit 9aae362d45
No known key found for this signature in database
GPG Key ID: 7AF5CBEE1DD6F76D
1 changed files with 8 additions and 2 deletions

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"