homebrew-cask/Casks/tower.rb

33 lines
1.2 KiB
Ruby

cask "tower" do
version "7.2,294,642368dc"
sha256 "f0d3309f30960fdc2f4427eac08dff9211cef409b2546d8fbbb3d576e8bc72d6"
url "https://fournova-app-updates.s3.amazonaws.com/apps/tower3-mac/#{version.csv.second}-#{version.csv.third}/Tower-#{version.csv.first}-#{version.csv.second}.zip",
verified: "fournova-app-updates.s3.amazonaws.com/"
name "Tower"
desc "Git client focusing on power and productivity"
homepage "https://www.git-tower.com/"
livecheck do
url "https://updates.fournova.com/tower3-mac/stable/releases/latest/download"
strategy :header_match do |headers|
match = headers["location"].match(%r{(\d+(?:\.\d+)*)-([a-z0-9]+)/Tower-(\d+(?:\.\d+)+)-(\d+(?:\.\d+)*)\.zip}i)
next if match.blank?
"#{match[3]},#{match[1]},#{match[2]}"
end
end
auto_updates true
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*.sfl2",
"~/Library/Application Support/com.fournova.Tower*",
"~/Library/Caches/com.fournova.Tower*",
"~/Library/Preferences/com.fournova.Tower*.plist",
]
end