homebrew-cask/Casks/mps.rb

27 lines
1.2 KiB
Ruby

cask 'mps' do
version '2017.3.1,173.1525'
sha256 '76a09697847e8088193f033a2492c41023df0855a4c00114771fc0d303a7465c'
url "https://download.jetbrains.com/mps/#{version.before_comma.major_minor}/MPS-#{version.before_comma}-macos-jdk-bundled.dmg"
appcast 'https://data.services.jetbrains.com/products/releases?code=MPS&latest=true&type=release',
checkpoint: '71f87cf8e19c87d76fc6cbecddd898df9500f3b2f5843caf524b332e2e5dcc0a'
name 'JetBrains MPS'
homepage 'https://www.jetbrains.com/mps/'
auto_updates true
app "MPS #{version.major_minor}.app"
uninstall_postflight do
ENV['PATH'].split(File::PATH_SEPARATOR).map { |path| File.join(path, 'mps') }.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: [
"~/MPSSamples.#{version.before_comma.major_minor}",
"~/Library/Application Support/MPS#{version.before_comma.major_minor}",
"~/Library/Caches/MPS#{version.before_comma.major_minor}",
"~/Library/Logs/MPS#{version.before_comma.major_minor}",
"~/Library/Preferences/MPS#{version.before_comma.major_minor}",
]
end