forked from Homebrew/homebrew-cask
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjprofiler.rb
More file actions
53 lines (40 loc) · 1.29 KB
/
jprofiler.rb
File metadata and controls
53 lines (40 loc) · 1.29 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
51
52
53
cask "jprofiler" do
version "16.0"
on_macos do
sha256 "1504b089704961b242ff7f13045f51f1530b39c5fea3e880ba278709ba7998ef"
url "https://download-gcdn.ej-technologies.com/jprofiler/jprofiler_macos_#{version.dots_to_underscores}.dmg"
end
on_linux do
sha256 "c7ff6d6130b36f360e953f88c45c447400e3ca984b05d72d0db9811566a478c0"
url "https://download-gcdn.ej-technologies.com/jprofiler/jprofiler_linux-x64_#{version.dots_to_underscores}.tar.gz"
end
name "JProfiler"
desc "Java profiler"
homepage "https://www.ej-technologies.com/jprofiler"
livecheck do
url "https://www.ej-technologies.com/feeds/jprofiler"
regex(/JProfiler\s*Release\s*v?(\d+(?:\.\d+)+)/i)
strategy :xml do |xml, regex|
xml.get_elements("//title").map do |item|
match = item.text&.strip&.match(regex)
next if match.blank?
match[1]
end
end
end
on_macos do
depends_on macos: ">= :big_sur"
app "JProfiler.app"
zap trash: [
"~/.jprofiler*",
"~/Library/Preferences/com.jprofiler.history.plist",
"~/Library/Preferences/com.jprofiler.v*.plist",
"~/Library/Preferences/jprofiler.vmoptions",
]
end
on_linux do
depends_on arch: :x86_64
binary "jprofiler#{version}/bin/jprofiler"
zap trash: "~/.jprofiler*"
end
end