forked from dahlia/homebrew-jetbrains-eap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpycharm-eap.rb
More file actions
47 lines (39 loc) · 1.67 KB
/
pycharm-eap.rb
File metadata and controls
47 lines (39 loc) · 1.67 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
cask "pycharm-eap" do
arch arm: "-aarch64"
version "2025.3,253.28294.166"
sha256 intel: "0b409a3e39e32d2e7396b126e8de4a9a8966667681f7377ef383ed4a409c0aeb",
arm: "8d8c04a38c47375a313fb70c178fb91f8ea2530eab0ec2b811d4471679fe51ee"
url "https://download.jetbrains.com/python/pycharm-professional-#{version.csv.second}#{arch}.dmg"
name "PyCharm EAP"
name "PyCharm Professional EAP"
desc "IDE for professional Python development (EAP)"
homepage "https://www.jetbrains.com/pycharm/nextversion/"
livecheck do
url "https://data.services.jetbrains.com/products/releases?code=PCP&latest=true&type=eap"
strategy :page_match do |page|
JSON.parse(page)["PCP"].map do |release|
"#{release["version"]},#{release["build"]}"
end
end
end
auto_updates true
# The application path is often inconsistent between versions
rename "PyCharm*.app", "PyCharm EAP.app"
app "PyCharm EAP.app"
binary "#{appdir}/PyCharm EAP.app/Contents/MacOS/pycharm", target: "pycharm-eap"
uninstall_postflight do
ENV["PATH"].split(File::PATH_SEPARATOR).map { |path| File.join(path, "charm") }.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/PyCharm#{version.csv.first}",
"~/Library/Caches/JetBrains/PyCharm#{version.csv.first}",
"~/Library/Logs/JetBrains/PyCharm#{version.csv.first}",
"~/Library/Preferences/com.jetbrains.pycharm-EAP.plist",
"~/Library/Saved Application State/com.jetbrains.pycharm-EAP.savedState",
]
end