Merge pull request #158015 from p-linnane/appium-inspector-livecheck

appium-inspector: update livecheck
This commit is contained in:
Rui Chen
2023-10-18 15:29:52 -04:00
committed by GitHub
+15 -1
View File
@@ -7,9 +7,23 @@ cask "appium-inspector" do
desc "GUI inspector for mobile apps"
homepage "https://github.com/appium/appium-inspector/"
# 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(/^Appium.*?mac[._-]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
app "Appium Inspector.app"