mirror of
https://github.com/wavetermdev/homebrew-cask.git
synced 2026-08-05 13:43:24 -07:00
s/stoplight-studio: update livecheck
This commit is contained in:
@@ -12,10 +12,15 @@ cask "stoplight-studio" do
|
||||
homepage "https://stoplight.io/studio/"
|
||||
|
||||
livecheck do
|
||||
url "https://github.com/stoplightio/studio/releases/latest"
|
||||
regex(%r{href=.*?/v?(\d+(?:\.\d+)+)[._-]stable[._-]([^/]+)/stoplight[._-]studio[._-]#{arch}\.dmg}i)
|
||||
strategy :page_match do |page, regex|
|
||||
page.scan(regex).map { |match| "#{match[0]},#{match[1]}" }
|
||||
url :url
|
||||
regex(%r{/v?(\d+(?:\.\d+)+)[._-]stable[._-]([^/]+)/stoplight[._-]studio[._-]#{arch}\.dmg$}i)
|
||||
strategy :github_latest do |json, regex|
|
||||
json["assets"]&.map do |asset|
|
||||
match = asset["browser_download_url"]&.match(regex)
|
||||
next if match.blank?
|
||||
|
||||
"#{match[1]},#{match[2]}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user