excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / z / zoho-mail.rb
blob2790174bb5bca825c4fe0fb78c1789f1e60ea27f
1 cask "zoho-mail" do
2   arch arm: "arm64-"
3   livecheck_arch = on_arch_conditional arm: "arm64", intel: "x64"
5   version "1.6.5"
6   sha256 arm:   "46ab4533ce034e4e9329a8e12187c43f7d5ca6aae7239ccfc45cd6ef3fe192d5",
7          intel: "9bff97c52d3599769ec97b0b47ce7fb82c1145bea12c2fd337a19b0daed84932"
9   url "https://downloads.zohocdn.com/zmail-desktop/mac/zoho-mail-desktop-lite-installer-#{arch}v#{version}.dmg",
10       verified: "downloads.zohocdn.com/zmail-desktop/mac/"
11   name "Zoho Mail"
12   desc "Email client"
13   homepage "https://www.zoho.com/mail/desktop/"
15   livecheck do
16     url "https://downloads.zohocdn.com/zmail-desktop/artifacts.json"
17     regex(/zoho[._-]mail[._-]desktop[._-]lite[._-]installer[._-]#{arch}v?(\d+(?:\.\d+)+)\.dmg/i)
18     strategy :json do |json, regex|
19       json["mac"]&.map do |_, item|
20         match = item[livecheck_arch]&.match(regex)
21         next if match.blank?
23         match[1]
24       end
25     end
26   end
28   depends_on macos: ">= :high_sierra"
30   app "Zoho Mail - Desktop.app"
32   zap trash: [
33     "~/Library/Application Support/Zoho Mail - Desktop",
34     "~/Library/Logs/Zoho Mail - Desktop",
35     "~/Library/Preferences/com.zoho.mail.desktop.plist",
36     "~/Library/Saved Application State/com.zoho.mail.desktop.savedState",
37   ]
38 end