cask "tower" do version "12.2,441,c7f962a4" sha256 "b6554b122b92f0185d52e9b04b5a0c4ba6eb036f9014ca1208fbe3078aaa123c" url "https://www.git-tower.com/apps/tower3-mac/#{version.csv.second}-#{version.csv.third}/Tower-#{version.csv.first}-#{version.csv.second}.zip" name "Tower" desc "Git client focusing on power and productivity" homepage "https://www.git-tower.com/" livecheck do url "https://www.git-tower.com/updates/tower3-mac/stable/releases/latest/download" regex(%r{(\d+(?:\.\d+)*)-([a-z0-9]+)/Tower-(\d+(?:\.\d+)+)-(\d+(?:\.\d+)*)\.zip}i) strategy :header_match do |headers, regex| match = headers["location"]&.match(regex) next if match.blank? "#{match[3]},#{match[1]},#{match[2]}" end end auto_updates true depends_on macos: ">= :big_sur" app "Tower.app" binary "#{appdir}/Tower.app/Contents/MacOS/gittower" zap trash: [ "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.fournova.tower*.sfl*", "~/Library/Application Support/com.fournova.Tower*", "~/Library/Caches/com.fournova.Tower*", "~/Library/Caches/com.plausiblelabs.crashreporter.data/com.fournova.Tower*", "~/Library/HTTPStorages/com.fournova.Tower*", "~/Library/Preferences/com.fournova.Tower*.plist", "~/Library/Saved Application State/com.fournova.Tower*.savedState", ] end