cask "automattic-texts" do arch arm: "arm64", intel: "x64" on_arm do version "0.84.4,26e3aec106" sha256 "329d799b9fa5edc647e2a3eac84242407e2fb50418105902371a3aa44b3efe8d" end on_intel do version "0.84.4,70e1db2d46" sha256 "66346aa06ffd712242b2ab12b79f7abe2a8daec23be9799fe42812c4b596b84e" end url "https://texts-binaries.texts.com/builds/Texts-macOS-#{arch}-v#{version.csv.first}-#{version.csv.second}.zip" name "Texts.com" desc "DM Manager" homepage "https://texts.com/" livecheck do url "https://texts.com/api/update-feed/latest-mac.yml?arch=#{arch}" regex(/Texts[._-]macOS[._-]#{arch}[._-]v?(\d+(?:\.\d+)+)[._-](\h+)\.zip/i) strategy :electron_builder do |item, regex| match = item["path"]&.match(regex) next if match.blank? "#{match[1]},#{match[2]}" end end depends_on macos: ">= :catalina" app "Texts.app" zap trash: [ "~/Library/Application Support/Texts", "~/Library/Caches/io.texts.Texts", "~/Library/HTTPStorages/io.texts.Texts", "~/Library/Preferences/com.texts.Texts.plist", ] end