Skip to content

Instantly share code, notes, and snippets.

@mfdj
Last active July 18, 2023 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfdj/e1f894d214e1484e2649f829589db85a to your computer and use it in GitHub Desktop.
Save mfdj/e1f894d214e1484e2649f829589db85a to your computer and use it in GitHub Desktop.
Homebrew cask for kaleidoscope 3.9,2176
brew reinstall --cask kaleidoscope.rb
# via https://github.com/Homebrew/homebrew-cask/blame/d81b3ccdd74823f6c9ef5f1adbbd6e717e2b1e0a/Casks/kaleidoscope.rb
cask "kaleidoscope" do
version "3.9,2176"
sha256 "036eea0cfd11797a72e37aa41af3c3acf65f7d6e9d5d5f5945444d49e232b44e"
url "https://updates.kaleidoscope.app/v#{version.major}/prod/Kaleidoscope-#{version.csv.first}-#{version.csv.second}.app.zip"
name "Kaleidoscope"
desc "Spot and merge differences in text and image files or folders"
homepage "https://kaleidoscope.app/"
livecheck do
url "https://updates.kaleidoscope.app/v#{version.major}/prod/appcast"
regex(/Kaleidoscope[._-]v?(\d+(?:\.\d+)+)[._-](\d+)\.app\.zip/i)
strategy :page_match do |page, regex|
page.scan(regex).map { |match| "#{match[0]},#{match[1]}" }
end
end
auto_updates true
conflicts_with cask: [
"ksdiff",
"homebrew/cask-versions/kaleidoscope2",
"homebrew/cask-versions/ksdiff2",
]
depends_on macos: ">= :big_sur"
app "Kaleidoscope.app"
postflight do
contents = "#{appdir}/Kaleidoscope.app/Contents"
system_command "#{contents}/Resources/Integration/scripts/install_ksdiff",
args: ["#{contents}/MacOS", "#{HOMEBREW_PREFIX}/bin"]
end
uninstall quit: "app.kaleidoscope.v#{version.major}",
pkgutil: "app.kaleidoscope.uninstall_ksdiff"
zap trash: [
"~/Library/Application Support/app.kaleidoscope.v*",
"~/Library/Application Support/com.blackpixel.kaleidoscope",
"~/Library/Application Support/Kaleidoscope",
"~/Library/Caches/app.kaleidoscope.v*",
"~/Library/Caches/com.blackpixel.kaleidoscope",
"~/Library/Caches/com.plausiblelabs.crashreporter.data/com.blackpixel.kaleidoscope",
"~/Library/Preferences/app.kaleidoscope.v*.plist",
"~/Library/Preferences/com.blackpixel.kaleidoscope.plist",
"~/Library/Saved Application State/app.kaleidoscope.v*.savedState",
"~/Library/Saved Application State/com.blackpixel.kaleidoscope.savedState",
"~/Library/WebKit/app.kaleidoscope.v*",
]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment