excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / w / wordpresscom-studio.rb
blobbfcca1f356a9d0176e812fe54fc0b9857c72e36d
1 cask "wordpresscom-studio" do
2   arch arm: "arm64", intel: "x64"
4   version "1.2.2"
5   sha256 arm:   "32f82cc7aa5fd47385d6a70bfa4da27b85871b162d8a7eafb4bad75d0fa07853",
6          intel: "c7302d41779ef8a62507ec01bd1a7dc7d3e646c14a16236b442296e9ecd8ce02"
8   url "https://cdn.a8c-ci.services/studio/studio-darwin-#{arch}-v#{version}.app.zip",
9       verified: "cdn.a8c-ci.services/studio/"
10   name "Wordpress Studio"
11   desc "WordPress local development environment"
12   homepage "https://developer.wordpress.com/studio/"
14   livecheck do
15     url "https://public-api.wordpress.com/wpcom/v2/studio-app/updates?platform=darwin&arch=#{arch}&version=0.0.0"
16     regex(/studio[._-]darwin[._-]#{arch}[._-]v?(\d+(?:\.\d+)+)\.app\.zip/i)
17     strategy :json do |json, regex|
18       match = json["url"]&.match(regex)
19       next if match.blank?
21       match[1]
22     end
23   end
25   auto_updates true
26   depends_on macos: ">= :catalina"
28   app "Studio.app"
30   uninstall quit: "com.electron.studio"
32   zap trash: [
33     "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.electron.studio.sfl*",
34     "~/Library/Application Support/Studio",
35     "~/Library/Caches/com.electron.studio*",
36     "~/Library/HTTPStorages/com.electron.studio",
37     "~/Library/Logs/Studio",
38     "~/Library/Preferences/com.electron.studio.plist",
39     "~/Library/Saved Application State/com.electron.studio.savedState",
40   ]
41 end