2 on_big_sur :or_older do
4 sha256 "448647db0068ff9a2b669ff2f9d715a36b4e5e1af82e9849e57d9f7078d1bd2e"
10 on_monterey :or_newer do
12 sha256 "8c12fe3c8abcf8368c44bf4c96808d2c44dd18d621d0235238b3724d3c9ad68c"
14 # Upstream publishes releases for multiple different minor versions and the
15 # "latest" release is sometimes a lower version. Until the "latest" release
16 # is reliably the highest version, we have to check multiple releases.
19 regex(/^Nextcloud[._-]v?(\d+(?:\.\d+)+)\.pkg$/i)
20 strategy :github_releases do |json, regex|
22 next if release["draft"] || release["prerelease"]
24 release["assets"]&.map do |asset|
25 match = asset["name"]&.match(regex)
35 url "https://github.com/nextcloud-releases/desktop/releases/download/v#{version}/Nextcloud-#{version}.pkg",
36 verified: "github.com/nextcloud-releases/desktop/"
38 desc "Desktop sync client for Nextcloud software products"
39 homepage "https://nextcloud.com/"
42 conflicts_with cask: "nextcloud-vfs"
43 depends_on macos: ">= :mojave"
45 pkg "Nextcloud-#{version}.pkg"
46 binary "/Applications/Nextcloud.app/Contents/MacOS/nextcloudcmd"
48 uninstall launchctl: "com.nextcloud.desktopclient",
49 quit: "com.nextcloud.desktopclient",
50 pkgutil: "com.nextcloud.desktopclient",
51 delete: "/Applications/Nextcloud.app"
54 "~/Library/Application Scripts/com.nextcloud.desktopclient.FinderSyncExt",
55 "~/Library/Application Support/Nextcloud",
56 "~/Library/Caches/Nextcloud",
57 "~/Library/Containers/com.nextcloud.desktopclient.FinderSyncExt",
58 "~/Library/Group Containers/com.nextcloud.desktopclient",
59 "~/Library/Preferences/com.nextcloud.desktopclient.plist",
60 "~/Library/Preferences/Nextcloud",