Skip to content

Commit 703dd13

Browse files
CopilotGoooler
andauthored
Add RustRover EAP cask (#1021)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Goooler <10363352+Goooler@users.noreply.github.com> Co-authored-by: Goooler <wangzongler@gmail.com>
1 parent b84b2d4 commit 703dd13

2 files changed

Lines changed: 51 additions & 0 deletions

File tree

Casks/rustrover-eap.rb

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
cask "rustrover-eap" do
2+
arch arm: "-aarch64"
3+
4+
version "2026.1,261.21525.29"
5+
sha256 intel: "b06ffb36014d6f7dafc80fee8cb7ee9568f7071945b9ba0b7895eaa1399d4671",
6+
arm: "0f8177f584f535d1542a0caa3704f3f20641ca0bce629390e613ccd28804da22"
7+
8+
url "https://download.jetbrains.com/rustrover/RustRover-#{version.csv.second}#{arch}.dmg"
9+
name "RustRover EAP"
10+
desc "Rust IDE (EAP)"
11+
homepage "https://www.jetbrains.com/rust/nextversion/"
12+
13+
livecheck do
14+
url "https://data.services.jetbrains.com/products/releases?code=RR&latest=true&type=eap"
15+
strategy :json do |json|
16+
json["RR"]&.map do |release|
17+
version = release["version"]
18+
build = release["build"]
19+
next if version.blank? || build.blank?
20+
21+
"#{version},#{build}"
22+
end
23+
end
24+
end
25+
26+
auto_updates true
27+
28+
# The application path is often inconsistent between versions
29+
rename "RustRover*.app", "RustRover EAP.app"
30+
31+
app "RustRover EAP.app"
32+
binary "#{appdir}/RustRover EAP.app/Contents/MacOS/rustrover", target: "rustrover-eap"
33+
34+
uninstall_postflight do
35+
ENV["PATH"].split(File::PATH_SEPARATOR).map { |path| File.join(path, "rustrover") }.each do |path|
36+
if File.readable?(path) &&
37+
File.readlines(path).grep(/# see com.intellij.idea.SocketLock for the server side of this interface/).any?
38+
File.delete(path)
39+
end
40+
end
41+
end
42+
43+
zap trash: [
44+
"~/Library/Application Support/JetBrains/RustRover#{version.csv.first}",
45+
"~/Library/Caches/JetBrains/RustRover#{version.csv.first}",
46+
"~/Library/Logs/JetBrains/RustRover#{version.csv.first}",
47+
"~/Library/Preferences/com.jetbrains.RustRover-EAP.plist",
48+
"~/Library/Saved Application State/com.jetbrains.RustRover-EAP.savedState",
49+
]
50+
end

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ casks.
2727
- `pycharm-eap`
2828
- `rider-eap`
2929
- `rubymine-eap`
30+
- `rustrover-eap`
3031
- `webstorm-eap`
3132

3233
FYI, Android Studio has beta and canary channel instead of EAP, and casks for

0 commit comments

Comments
 (0)