Merge pull request #200213 from Homebrew/bump-tidelift-1.14.0
[Homebrew/homebrew-cask.git] / Casks / n / nextcloud.rb
blobfcb472572afbc7461e972255b3fa2481cfbf8b17
1 cask "nextcloud" do
2   on_big_sur :or_older do
3     version "3.8.1"
4     sha256 "448647db0068ff9a2b669ff2f9d715a36b4e5e1af82e9849e57d9f7078d1bd2e"
6     livecheck do
7       skip "Legacy version"
8     end
9   end
10   on_monterey :or_newer do
11     version "3.15.3"
12     sha256 "0a205646371515a4d92a4dbb91898b97b773ddd0bcc2d64e65ad84d772a222c4"
14     livecheck do
15       url "https://download.nextcloud.com/desktop/releases/Mac/Installer/"
16       regex(/href=.*?Nextcloud[._-]v?(\d+(?:\.\d+)+)\.pkg/i)
17     end
18   end
20   url "https://download.nextcloud.com/desktop/releases/Mac/Installer/Nextcloud-#{version}.pkg"
21   name "Nextcloud"
22   desc "Desktop sync client for Nextcloud software products"
23   homepage "https://nextcloud.com/"
25   auto_updates true
26   conflicts_with cask: "nextcloud-vfs"
27   depends_on macos: ">= :mojave"
29   pkg "Nextcloud-#{version}.pkg"
30   binary "/Applications/Nextcloud.app/Contents/MacOS/nextcloudcmd"
32   uninstall launchctl: "com.nextcloud.desktopclient",
33             quit:      "com.nextcloud.desktopclient",
34             pkgutil:   "com.nextcloud.desktopclient",
35             delete:    "/Applications/Nextcloud.app"
37   zap trash: [
38     "~/Library/Application Scripts/com.nextcloud.desktopclient.FinderSyncExt",
39     "~/Library/Application Support/Nextcloud",
40     "~/Library/Caches/Nextcloud",
41     "~/Library/Containers/com.nextcloud.desktopclient.FinderSyncExt",
42     "~/Library/Group Containers/com.nextcloud.desktopclient",
43     "~/Library/Preferences/com.nextcloud.desktopclient.plist",
44     "~/Library/Preferences/Nextcloud",
45   ]
46 end