cask "wordpresscom-studio" do arch arm: "arm64", intel: "x64" version "1.5.4" sha256 arm: "8ee337cc8bcf9ffe3ba0c68150fd37f134c1a17d89b6cca00c9af8fbfd7ce13c", intel: "72736a869d0447295e13aaefe00c8c032fb94f267d785ee1c30800889f85efe0" url "https://cdn.a8c-ci.services/studio/studio-darwin-#{arch}-v#{version}.app.zip", verified: "cdn.a8c-ci.services/studio/" name "Wordpress Studio" desc "WordPress local development environment" homepage "https://developer.wordpress.com/studio/" livecheck do url "https://public-api.wordpress.com/wpcom/v2/studio-app/updates?platform=darwin&arch=#{arch}&version=0.0.0" regex(/studio[._-]darwin[._-]#{arch}[._-]v?(\d+(?:\.\d+)+)\.app\.zip/i) strategy :json do |json, regex| match = json["url"]&.match(regex) next if match.blank? match[1] end end auto_updates true depends_on macos: ">= :catalina" app "Studio.app" uninstall quit: "com.electron.studio" zap trash: [ "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.electron.studio.sfl*", "~/Library/Application Support/Studio", "~/Library/Caches/com.electron.studio*", "~/Library/HTTPStorages/com.electron.studio", "~/Library/Logs/Studio", "~/Library/Preferences/com.electron.studio.plist", "~/Library/Saved Application State/com.electron.studio.savedState", ] end