homebrew-cask/Casks/clion.rb

26 lines
1.1 KiB
Ruby

cask 'clion' do
version '2017.3.1,173.4127.32'
sha256 '48782e9a481d1e0669b7cbbdefee0fa8a3766609640f3cff8653821eec11abca'
url "https://download.jetbrains.com/cpp/CLion-#{version.before_comma}.dmg"
appcast 'https://data.services.jetbrains.com/products/releases?code=CL&latest=true&type=release',
checkpoint: '416ae475b6cfa4e053f77fb290038ecd92c457520358d5fb754f5bf3cd2ed683'
name 'CLion'
homepage 'https://www.jetbrains.com/clion/'
auto_updates true
app 'CLion.app'
uninstall_postflight do
ENV['PATH'].split(File::PATH_SEPARATOR).map { |path| File.join(path, 'clion') }.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/CLion#{version.major_minor}",
"~/Library/Caches/CLion#{version.major_minor}",
"~/Library/Logs/CLion#{version.major_minor}",
"~/Library/Preferences/CLion#{version.major_minor}",
]
end