cask "proton-mail" do version "1.8.0" sha256 "2048152e4774b4e60156514955e9e309e6169684331fe2a3a451e03f74184801" url "https://proton.me/download/mail/macos/#{version}/ProtonMail-desktop.dmg" name "Proton Mail" desc "Client for Proton Mail and Proton Calendar" homepage "https://proton.me/mail" livecheck do url "https://proton.me/download/mail/macos/version.json" strategy :json do |json| json["Releases"]&.map do |item| next unless item["CategoryName"]&.match?("Stable") item["Version"] end end end auto_updates true depends_on macos: ">= :catalina" app "Proton Mail.app" zap trash: [ "~/Library/Application Support/Proton Mail", "~/Library/Caches/ch.protonmail.desktop", "~/Library/Caches/ch.protonmail.desktop.ShipIt", "~/Library/HTTPStorages/ch.protonmail.desktop", "~/Library/Logs/Proton Mail", "~/Library/Preferences/ch.protonmail.desktop.plist", "~/Library/Saved Application State/ch.protonmail.desktop.savedState", ] end