excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / s / stoplight-studio.rb
blob7308d4360e5514f57fa2fb0f4334951b2caefa04
1 cask "stoplight-studio" do
2   arch arm: "arm64", intel: "x64"
4   version "2.10.0,9587.git-0533c10"
5   sha256 arm:   "4e2d57b4cb6471995af03e770bdec2900c8c97ebffc61beb731d47611aba24ee",
6          intel: "a9c66e62b966cdcfe7e383c68fefef71f220bd7466014a24b5a1918fd2650475"
8   url "https://github.com/stoplightio/studio/releases/download/v#{version.csv.first}-stable.#{version.csv.second}/stoplight-studio-mac-#{arch}.dmg",
9       verified: "github.com/stoplightio/studio/"
10   name "Stoplight Studio"
11   desc "Editor for designing and documenting APIs"
12   homepage "https://stoplight.io/studio/"
14   livecheck do
15     url :url
16     regex(%r{/v?(\d+(?:\.\d+)+)[._-]stable[._-]([^/]+)/stoplight[._-]studio[._-]mac[._-]#{arch}\.dmg$}i)
17     strategy :github_latest do |json, regex|
18       json["assets"]&.map do |asset|
19         match = asset["browser_download_url"]&.match(regex)
20         next if match.blank?
22         "#{match[1]},#{match[2]}"
23       end
24     end
25   end
27   app "Stoplight Studio.app"
29   zap trash: [
30     "~/Library/Application Support/Stoplight Studio",
31     "~/Library/Logs/Stoplight Studio",
32     "~/Library/Preferences/com.stoplight.studio.plist",
33     "~/Library/Saved Application State/com.stoplight.studio.savedState",
34   ]
35 end