homebrew-cask/Casks/datagrip.rb

25 lines
1.0 KiB
Ruby

cask 'datagrip' do
version '2018.3.1,183.4886.38'
sha256 '3032eb59820a890f18e2c036e96a23e198fae84bde1f8c9e21058e50992b8305'
url "https://download.jetbrains.com/datagrip/datagrip-#{version.before_comma}.dmg"
appcast 'https://data.services.jetbrains.com/products/releases?code=DG&latest=true&type=release'
name 'DataGrip'
homepage 'https://www.jetbrains.com/datagrip/'
auto_updates true
app 'DataGrip.app'
uninstall_postflight do
ENV['PATH'].split(File::PATH_SEPARATOR).map { |path| File.join(path, 'datagrip') }.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/DataGrip#{version.major_minor}",
"~/Library/Caches/DataGrip#{version.major_minor}",
"~/Library/Logs/DataGrip#{version.major_minor}",
"~/Library/Preferences/DataGrip#{version.major_minor}",
]
end