vorta: use github_releases livecheck strategy

This commit is contained in:
Bevan Kay
2023-11-06 21:30:53 +11:00
parent 3a31aeadc7
commit 52fee5fde6
+15 -1
View File
@@ -7,9 +7,23 @@ cask "vorta" do
desc "Desktop Backup Client for Borg"
homepage "https://github.com/borgbase/vorta"
# Not every GitHub release provides a file for macOS, so we check multiple
# recent releases instead of only the "latest" release.
livecheck do
url :url
strategy :github_latest
regex(/^vorta[._-]v?(\d+(?:\.\d+)+)\.(?:dmg|pkg|zip)$/i)
strategy :github_releases do |json, regex|
json.map do |release|
next if release["draft"] || release["prerelease"]
release["assets"]&.map do |asset|
match = asset["name"]&.match(regex)
next if match.blank?
match[1]
end
end.flatten
end
end
auto_updates true