homebrew-cask/Casks/pycharm-ce.rb

33 lines
1.5 KiB
Ruby

cask 'pycharm-ce' do
version '2017.2.4,172.4343.24'
sha256 'f42fe4470ad6fa6244b2d0f4e43d2decbc3c98fc31846f08a92592dff98758bc'
url "https://download.jetbrains.com/python/pycharm-community-#{version.before_comma}.dmg"
appcast 'https://data.services.jetbrains.com/products/releases?code=PCC&latest=true&type=release',
checkpoint: '8ac6d33d0fce2f9e74c80a2377989ee4e5f0799be2cabd7a9db1f7c8862738fa'
name 'Jetbrains PyCharm Community Edition'
name 'PyCharm CE'
homepage 'https://www.jetbrains.com/pycharm/'
auto_updates true
app 'PyCharm CE.app'
uninstall_postflight do
ENV['PATH'].split(File::PATH_SEPARATOR).map { |path| File.join(path, 'charm') }.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 delete: [
"~/Library/Caches/PyCharmCE#{version.major_minor}",
"~/Library/Caches/PyCharm#{version.major_minor}",
"~/Library/Logs/PyCharm#{version.major_minor}",
"~/Library/Logs/PyCharmCE#{version.major_minor}",
'~/Library/Saved Application State/com.jetbrains.pycharm.savedState',
],
trash: [
"~/Library/Application Support/PyCharm#{version.major_minor}",
"~/Library/Preferences/PyCharm#{version.major_minor}",
"~/Library/Preferences/PyCharmCE#{version.major_minor}",
]
end