homebrew-cask/Casks/datagrip.rb

26 lines
1.1 KiB
Ruby

cask 'datagrip' do
version '2017.2.3,172.4574.13'
sha256 '76805ba65546e5f5ca5afd613ff31ff7bc29ff30cb7ee1c5488fa029d7993353'
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',
checkpoint: 'ecfb6d21a8fce49381942358650867573c70c980a99cc24b9b71bdbd45652195'
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