44 lines
1.4 KiB
Ruby
44 lines
1.4 KiB
Ruby
cask "phpstorm" do
|
|
arch arm: "-aarch64"
|
|
|
|
version "2023.3.1,233.11799.297"
|
|
sha256 arm: "15cc0735cd2073d9e5a9bbbefa8d973cf05eabfd8fab0f77bd137e72cfd7f31c",
|
|
intel: "dbf18efa0be9a029e09ecbc7f82f901643d81c2f96e75f73ec5ef12092c1008a"
|
|
|
|
url "https://download.jetbrains.com/webide/PhpStorm-#{version.csv.first}#{arch}.dmg"
|
|
name "JetBrains PhpStorm"
|
|
desc "PHP IDE by JetBrains"
|
|
homepage "https://www.jetbrains.com/phpstorm/"
|
|
|
|
livecheck do
|
|
url "https://data.services.jetbrains.com/products/releases?code=PS&latest=true&type=release"
|
|
strategy :json do |json|
|
|
json["PS"].map do |release|
|
|
"#{release["version"]},#{release["build"]}"
|
|
end
|
|
end
|
|
end
|
|
|
|
auto_updates true
|
|
depends_on macos: ">= :high_sierra"
|
|
|
|
app "PhpStorm.app"
|
|
|
|
uninstall_postflight do
|
|
ENV["PATH"].split(File::PATH_SEPARATOR).map { |path| File.join(path, "pstorm") }.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/PhpStorm#{version.major_minor}",
|
|
"~/Library/Caches/PhpStorm#{version.major_minor}",
|
|
"~/Library/Logs/PhpStorm#{version.major_minor}",
|
|
"~/Library/Preferences/jetbrains.phpstorm.*.plist",
|
|
"~/Library/Preferences/PhpStorm#{version.major_minor}",
|
|
]
|
|
end
|