44 lines
1.5 KiB
Ruby
44 lines
1.5 KiB
Ruby
cask "mps" do
|
|
arch arm: "macos-aarch64", intel: "macos"
|
|
|
|
version "2022.3,223.8836.1185"
|
|
sha256 arm: "40d8a928a1c1703544c9905a3f8e6a7d0ade3b17302782da2ed68fd1dcdafef9",
|
|
intel: "17cb973af11118c246d4144ba0071ce31fe3f276be7029f613cdb0fa60b752cc"
|
|
|
|
url "https://download.jetbrains.com/mps/#{version.major_minor}/MPS-#{version.csv.first}-#{arch}.dmg"
|
|
name "JetBrains MPS"
|
|
desc "Create your own domain-specific language"
|
|
homepage "https://www.jetbrains.com/mps/"
|
|
|
|
livecheck do
|
|
url "https://data.services.jetbrains.com/products/releases?code=MPS&latest=true&type=release"
|
|
strategy :json do |json|
|
|
json["MPS"].map do |release|
|
|
"#{release["version"]},#{release["build"]}"
|
|
end
|
|
end
|
|
end
|
|
|
|
auto_updates true
|
|
depends_on macos: ">= :high_sierra"
|
|
|
|
app "MPS #{version.major_minor}.app"
|
|
|
|
uninstall_postflight do
|
|
ENV["PATH"].split(File::PATH_SEPARATOR).map { |path| File.join(path, "mps") }.each do |path|
|
|
if File.readable?(path) &&
|
|
File.readlines(path).grep(/# see com.intellij.idea.SocketLock for the server side of this interface/).any?
|
|
File.delete(path)
|
|
end
|
|
end
|
|
end
|
|
|
|
zap trash: [
|
|
"~/Library/Application Support/MPS#{version.csv.first.major_minor}",
|
|
"~/Library/Caches/MPS#{version.csv.first.major_minor}",
|
|
"~/Library/Logs/MPS#{version.csv.first.major_minor}",
|
|
"~/Library/Preferences/MPS#{version.csv.first.major_minor}",
|
|
"~/MPSSamples.#{version.csv.first.major_minor}",
|
|
]
|
|
end
|