-
-
Notifications
You must be signed in to change notification settings - Fork 11.5k
Expand file tree
/
Copy pathtemurin@17.rb
More file actions
34 lines (26 loc) · 1.35 KB
/
temurin@17.rb
File metadata and controls
34 lines (26 loc) · 1.35 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
cask "temurin@17" do
arch arm: "aarch64", intel: "x64"
version "17.0.19,10"
sha256 arm: "e709b76af0a28d1a0ebffe042a6c90082ef56343508c57fa4955227d8937f6e4",
intel: "2c0f68b2bde4d4243bfe83f531ac0133a31dbe073301641013cce517af5ef021"
url "https://github.com/adoptium/temurin#{version.major}-binaries/releases/download/jdk-#{version.csv.first}%2B#{version.csv.second}/OpenJDK#{version.major}U-jdk_#{arch}_mac_hotspot_#{version.csv.first}_#{version.csv.second.major}.pkg",
verified: "github.com/adoptium/"
name "Eclipse Temurin Java Development Kit"
desc "JDK from the Eclipse Foundation (Adoptium)"
homepage "https://adoptium.net/"
livecheck do
url "https://api.adoptium.net/v3/assets/feature_releases/#{version.major}/ga?architecture=#{arch}&image_type=jdk&jvm_impl=hotspot&os=mac&page=0&page_size=1&project=jdk&sort_method=DEFAULT&sort_order=DESC&vendor=eclipse"
regex(/^jdk-(\d+(?:\.\d+)+)\+(\d+(?:\.\d+)*)$/i)
strategy :json do |json, regex|
json.map do |release|
match = release["release_name"]&.match(regex)
next if match.blank?
"#{match[1]},#{match[2]}"
end
end
end
depends_on :macos
pkg "OpenJDK#{version.major}U-jdk_#{arch}_mac_hotspot_#{version.csv.first}_#{version.csv.second.major}.pkg"
uninstall pkgutil: "net.temurin.#{version.major}.jdk"
# No zap stanza required
end