cask "zoho-mail" do arch arm: "arm64-" livecheck_arch = on_arch_conditional arm: "arm64", intel: "x64" version "1.6.5" sha256 arm: "46ab4533ce034e4e9329a8e12187c43f7d5ca6aae7239ccfc45cd6ef3fe192d5", intel: "9bff97c52d3599769ec97b0b47ce7fb82c1145bea12c2fd337a19b0daed84932" url "https://downloads.zohocdn.com/zmail-desktop/mac/zoho-mail-desktop-lite-installer-#{arch}v#{version}.dmg", verified: "downloads.zohocdn.com/zmail-desktop/mac/" name "Zoho Mail" desc "Email client" homepage "https://www.zoho.com/mail/desktop/" livecheck do url "https://downloads.zohocdn.com/zmail-desktop/artifacts.json" regex(/zoho[._-]mail[._-]desktop[._-]lite[._-]installer[._-]#{arch}v?(\d+(?:\.\d+)+)\.dmg/i) strategy :json do |json, regex| json["mac"]&.map do |_, item| match = item[livecheck_arch]&.match(regex) next if match.blank? match[1] end end end depends_on macos: ">= :high_sierra" app "Zoho Mail - Desktop.app" zap trash: [ "~/Library/Application Support/Zoho Mail - Desktop", "~/Library/Logs/Zoho Mail - Desktop", "~/Library/Preferences/com.zoho.mail.desktop.plist", "~/Library/Saved Application State/com.zoho.mail.desktop.savedState", ] end