mirror of
https://github.com/wavetermdev/homebrew-cask.git
synced 2026-08-05 13:43:24 -07:00
vorta: use github_releases livecheck strategy
This commit is contained in:
+15
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user