cask "pitch" do version "2.48.1,stable.1,6911507" sha256 "5bb90b90fd17abb527e432eb3b0286cde3af7d44cdadf367f11fa9c4eface0c0" url "https://desktop-app-builds.pitch.com/Pitch-#{version.csv.first}-#{version.csv.second}-ci#{version.csv.third}.dmg" name "Pitch" desc "Collaborative presentation software" homepage "https://pitch.com/" livecheck do url "https://desktop-app-builds.pitch.com/latest-mac.yml" regex(/Pitch[._-]v?(\d+(?:\.\d+)+)-([^-]+)-ci(\d+)\.dmg/i) strategy :electron_builder do |yaml, regex| yaml["files"]&.map do |item| match = item["url"]&.match(regex) next if match.blank? "#{match[1]},#{match[2]},#{match[3]}" end end end app "Pitch.app" zap trash: [ "~/Library/Application Support/Pitch", "~/Library/Logs/Pitch", "~/Library/Preferences/io.pitch.pitch-macos.plist", "~/Library/Saved Application State/io.pitch.pitch-macos.savedState", ] end