-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathintellij-idea-eap.rb
More file actions
50 lines (41 loc) · 1.72 KB
/
Copy pathintellij-idea-eap.rb
File metadata and controls
50 lines (41 loc) · 1.72 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 "intellij-idea-eap" do
arch arm: "-aarch64"
version "2026.1,261.17801.55"
sha256 arm: "4ca9a64ef9bfd72e47a39d6d49feb969e78f0117690f2416f946fc9d6861fb24",
intel: "c7b40fc927d6beb483695e420361195f0f438719d164402a5b979f351023be84"
url "https://download.jetbrains.com/idea/ideaIU-#{version.csv.second}#{arch}.dmg"
name "IntelliJ IDEA EAP"
desc "IntelliJ IDEA Early Access Program"
homepage "https://www.jetbrains.com/idea/nextversion"
livecheck do
url "https://data.services.jetbrains.com/products/releases?code=IIU&release.type=eap"
strategy :json do |json|
json["IIU"]&.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 "IntelliJ IDEA*.app", "IntelliJ IDEA EAP.app"
app "IntelliJ IDEA EAP.app"
binary "#{appdir}/IntelliJ IDEA EAP.app/Contents/MacOS/idea", target: "idea-eap"
uninstall_postflight do
ENV["PATH"].split(File::PATH_SEPARATOR).map { |path| File.join(path, "idea") }.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/IntelliJIdea#{version.csv.first}",
"~/Library/Caches/JetBrains/IntelliJIdea#{version.csv.first}",
"~/Library/Logs/JetBrains/IntelliJIdea#{version.csv.first}",
"~/Library/Preferences/com.jetbrains.intellij-EAP.plist",
"~/Library/Saved Application State/com.jetbrains.intellij-EAP.savedState",
]
end