cask "automattic-texts" do arch arm: "arm64", intel: "x64" on_arm do version "0.84.15,523bc4c5ef" sha256 "11abb5e1bc991f5b5bb871c88e0eecd37024af024cff622e959c096e4d4bd90d" end on_intel do version "0.84.15,afceba0ce4" sha256 "33cc91578dca9facdf60b3a7d2132ceeeda7f75748e789d6949ba476df2b7b49" 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