1 cask "kaleidoscope@3" do
3 sha256 "036eea0cfd11797a72e37aa41af3c3acf65f7d6e9d5d5f5945444d49e232b44e"
5 url "https://updates.kaleidoscope.app/v#{version.major}/prod/Kaleidoscope-#{version.csv.first}-#{version.csv.second}.app.zip"
7 desc "Spot and merge differences in text and image files or folders"
8 homepage "https://kaleidoscope.app/"
10 # Upstream also includes the newest version across all major versions, so we
11 # have to omit items with a different major version.
13 url "https://updates.kaleidoscope.app/v#{version.major}/prod/appcast"
14 regex(/Kaleidoscope[._-]v?(\d+(?:\.\d+)+)[._-](\d+)\.app\.zip/i)
15 strategy :sparkle do |items, regex|
17 next if item.short_version&.split(".")&.first != version.major
19 match = item.url.match(regex)
22 "#{match[1]},#{match[2]}"
28 conflicts_with cask: %w[
33 depends_on macos: ">= :big_sur"
35 app "Kaleidoscope.app"
38 contents = "#{appdir}/Kaleidoscope.app/Contents"
39 system_command "#{contents}/Resources/Integration/scripts/install_ksdiff",
40 args: ["#{contents}/MacOS", "#{HOMEBREW_PREFIX}/bin"]
43 uninstall quit: "app.kaleidoscope.v#{version.major}",
44 pkgutil: "app.kaleidoscope.uninstall_ksdiff"
47 "~/Library/Application Support/app.kaleidoscope.v*",
48 "~/Library/Application Support/com.blackpixel.kaleidoscope",
49 "~/Library/Application Support/Kaleidoscope",
50 "~/Library/Caches/app.kaleidoscope.v*",
51 "~/Library/Caches/com.blackpixel.kaleidoscope",
52 "~/Library/Caches/com.plausiblelabs.crashreporter.data/com.blackpixel.kaleidoscope",
53 "~/Library/Preferences/app.kaleidoscope.v*.plist",
54 "~/Library/Preferences/com.blackpixel.kaleidoscope.plist",
55 "~/Library/Saved Application State/app.kaleidoscope.v*.savedState",
56 "~/Library/Saved Application State/com.blackpixel.kaleidoscope.savedState",
57 "~/Library/WebKit/app.kaleidoscope.v*",