cask "clion" do arch arm: "-aarch64" version "2024.2.3,242.23726.125" sha256 arm: "998d629381e6f596b8e0cf5289fe8ca7cfd3221fc73b6c8548d768889b14196f", intel: "0dfc4d50268e58bb6b3c42c270ea8cca638a8733a5e2e010447cc74d585895e8" url "https://download.jetbrains.com/cpp/CLion-#{version.csv.first}#{arch}.dmg" name "CLion" desc "C and C++ IDE" homepage "https://www.jetbrains.com/clion/" livecheck do url "https://data.services.jetbrains.com/products/releases?code=CL&latest=true&type=release" strategy :json do |json| json["CL"]&.map do |release| version = release["version"] build = release["build"] next if version.blank? || build.blank? "#{version},#{build}" end end end auto_updates true depends_on macos: ">= :catalina" app "CLion.app" binary "#{appdir}/CLion.app/Contents/MacOS/clion" zap trash: [ "~/Library/Application Support/JetBrains/CLion#{version.major_minor}", "~/Library/Caches/JetBrains/CLion#{version.major_minor}", "~/Library/Logs/JetBrains/CLion#{version.major_minor}", "~/Library/Preferences/CLion#{version.major_minor}", "~/Library/Preferences/com.jetbrains.CLion.plist", "~/Library/Preferences/jetbrains.clion.*.plist", "~/Library/Saved Application State/com.jetbrains.CLion.savedState", ] end