cask "slite" do arch arm: "arm64", intel: "x64" version "1.2.24,240910g8wxg6biq" sha256 arm: "f87cfde9f2a724401fe5be63a74546b0c53b22f1381b7afd1d377ea8f748be98", intel: "94675c7d0720efbac1645abfed44177109eb28870e249632adad5793d48fec5e" url "https://download.todesktop.com/20062929x31pwfi/Slite%20#{version.csv.first}%20-%20Build%20#{version.csv.second}-#{arch}-mac.zip", verified: "download.todesktop.com/20062929x31pwfi/" name "Slite" desc "Team communication and collaboration software" homepage "https://slite.com/" livecheck do url "https://download.todesktop.com/20062929x31pwfi/latest-mac.yml" regex(/Build[ ._-]([^-]+)[._-]/i) strategy :electron_builder do |yaml, regex| yaml["files"]&.map do |item| match = item["url"]&.match(regex) next if match.blank? "#{yaml["version"]},#{match[1]}" end end end app "Slite.app" zap trash: [ "~/Library/Application Support/Slite", "~/Library/Caches/com.slite.desktop", "~/Library/Caches/com.slite.desktop.ShipIt", "~/Library/Preferences/com.slite.desktop.helper.plist", "~/Library/Preferences/com.slite.desktop.plist", "~/Library/Saved Application State/com.slite.desktop.savedState", ] end