cask "copilot" do version "5.0.1,237-cbd16ca2" sha256 "cbd16ca211f16585618b0c7f937eb197055f48851d783f34bdd77f8c49429862" url "https://storage.googleapis.com/copilot-mac-releases/images/Copilot-#{version.csv.first}-#{version.csv.second}.dmg", verified: "storage.googleapis.com/copilot-mac-releases/" name "Copilot" desc "Track and budget money" homepage "https://copilot.money/" livecheck do url "https://releases.copilot.money/last_release?channel=production" regex(/copilot[._-](\d+(?:\.\d+)+)-(\d+-\h+)/i) strategy :json do |json, regex| json["url"]&.scan(regex)&.map { |match| "#{match[0]},#{match[1]}" } end end auto_updates true depends_on macos: ">= :monterey" app "Copilot.app" zap trash: [ "~/Library/Containers/com.copilot.production", "~/Library/Group Containers/group.com.copilot.production", ] end