homebrew-cask/Casks/goland.rb

25 lines
995 B
Ruby

cask 'goland' do
version '2019.1.1,191.6707.68'
sha256 'af54dfde9b1559270c05bcd0d66ac9e68590fd81b07cfb4004a0024ecfee0e5b'
url "https://download.jetbrains.com/go/goland-#{version.before_comma}.dmg"
appcast 'https://data.services.jetbrains.com/products/releases?code=GO&latest=true&type=release'
name 'Goland'
homepage 'https://www.jetbrains.com/go/'
auto_updates true
app 'GoLand.app'
uninstall_postflight do
ENV['PATH'].split(File::PATH_SEPARATOR).map { |path| File.join(path, 'goland') }.each { |path| File.delete(path) if File.exist?(path) && File.readlines(path).grep(%r{# see com.intellij.idea.SocketLock for the server side of this interface}).any? }
end
zap trash: [
"~/Library/Application Support/GoLand#{version.major_minor}",
"~/Library/Caches/GoLand#{version.major_minor}",
"~/Library/Logs/GoLand#{version.major_minor}",
"~/Library/Preferences/GoLand#{version.major_minor}",
]
end