-
-
Notifications
You must be signed in to change notification settings - Fork 11.5k
Expand file tree
/
Copy pathtemurin@21.rb
More file actions
34 lines (26 loc) · 1.34 KB
/
temurin@21.rb
File metadata and controls
34 lines (26 loc) · 1.34 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@21" do
arch arm: "aarch64", intel: "x64"
version "21.0.11,10"
sha256 arm: "1c1721d5df6c2ab2edd8d2801bac07a8895b051e51b1946b1897d0a712138115",
intel: "a814d873a80386f3d2eeca6b8408efcad8d824e61ffa1c2dcb38c95dbb6918e1"
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 21"
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+)*)(?:-LTS)?$/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