forked from dahlia/homebrew-jetbrains-eap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpstorm-eap.rb
More file actions
50 lines (41 loc) · 1.7 KB
/
Copy pathphpstorm-eap.rb
File metadata and controls
50 lines (41 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
cask "phpstorm-eap" do
arch arm: "-aarch64"
version "2025.3.2,253.30387.30"
sha256 arm: "d9c7f38c7cb93efca1c21c706ebdc5ea11026839c66f6a563d4bbc546675769f",
intel: "732295b75bb5a525ab18c4466be2ab78a49c6bf30df2cbf0a5350e9468e3fc9b"
url "https://download.jetbrains.com/webide/PhpStorm-#{version.csv.second}#{arch}.dmg"
name "JetBrains PhpStorm EAP"
desc "PHP IDE by JetBrains (EAP)"
homepage "https://www.jetbrains.com/phpstorm/nextversion/"
livecheck do
url "https://data.services.jetbrains.com/products/releases?code=PS&release.type=eap"
strategy :json do |json|
json["PS"]&.map do |release|
version = release["version"]
build = release["build"]
next if version.blank? || build.blank?
"#{version},#{build}"
end
end
end
auto_updates true
# The application path is often inconsistent between versions
rename "PhpStorm*.app", "PhpStorm EAP.app"
app "PhpStorm EAP.app"
binary "#{appdir}/PhpStorm EAP.app/Contents/MacOS/phpstorm", target: "phpstorm-eap"
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/JetBrains/PhpStorm#{version.csv.first}",
"~/Library/Caches/JetBrains/PhpStorm#{version.csv.first}",
"~/Library/Logs/JetBrains/PhpStorm#{version.csv.first}",
"~/Library/Preferences/com.jetbrains.PhpStorm-EAP.plist",
"~/Library/Saved Application State/com.jetbrains.PhpStorm-EAP.savedState",
]
end