homebrew-cask/Casks/gitfiend.rb

37 lines
932 B
Ruby

cask "gitfiend" do
version "0.39.4"
sha256 "8fdee2bfe124e2ab6b24b985f5fde7603bade71d495af2ac0cf45f69d3e24a8c"
url "https://gitfiend.com/resources/GitFiend-#{version}.dmg"
name "GitFiend"
desc "Git client"
homepage "https://gitfiend.com/"
livecheck do
url "https://gitfiend.com/app-info"
strategy :json do |json|
json["version"]
end
end
auto_updates true
app "GitFiend.app"
# shim script (https://github.com/Homebrew/homebrew-cask/issues/18809)
shimscript = "#{staged_path}/gitfiend.wrapper.sh"
binary shimscript, target: "gitfiend"
preflight do
File.write shimscript, <<~EOS
#!/bin/sh
exec '#{appdir}/GitFiend.app/Contents/MacOS/GitFiend' "$@"
EOS
end
zap trash: [
"~/Library/Application Support/GitFiend",
"~/Library/Preferences/com.tobysuggate.gitfiend.plist",
"~/Library/Saved Application State/com.tobysuggate.gitfiend.savedState",
]
end