cask "clion@eap" do arch arm: "-aarch64" version "2024.3,243.21565.87" sha256 arm: "59f2a81ca446ca9fcd2b8c36c00944b7d63e4efa3632a2734a1d15582fe87413", intel: "814a3c346a463c1c8e9e01af5aa9812ecded642a9c0bff73e874589a36e883e6" url "https://download.jetbrains.com/cpp/CLion-#{version.csv.second}#{arch}.dmg" name "CLion EAP" desc "CLion Early Access Program" homepage "https://www.jetbrains.com/clion/nextversion" livecheck do url "https://data.services.jetbrains.com/products/releases?code=CL&latest=true&release.type=eap" 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 #{version.csv.first} EAP.app" binary "#{appdir}/CLion #{version.csv.first} EAP.app/Contents/MacOS/clion", target: "clion-eap" 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