35 lines
1.3 KiB
Ruby
35 lines
1.3 KiB
Ruby
cask "zulu@8" do
|
|
arch arm: "aarch64", intel: "x64"
|
|
|
|
version "8.0.412,8.78.0.19"
|
|
sha256 arm: "f27fbac1250c9a2a5c9e29e622adb49f7ead160b3ed49ac85b0d8e17cf411b2f",
|
|
intel: "49c28ef4c069cc3c602fdd124ecf3d46fa0a7438037a6baa61af1cd7a07b4fe4"
|
|
|
|
url "https://cdn.azul.com/zulu/bin/zulu#{version.csv.second}-ca-jdk#{version.csv.first}-macosx_#{arch}.dmg",
|
|
referer: "https://www.azul.com/downloads/"
|
|
name "Azul Zulu Java 8 Standard Edition Development Kit"
|
|
desc "OpenJDK distribution from Azul"
|
|
homepage "https://www.azul.com/"
|
|
|
|
livecheck do
|
|
url "https://api.azul.com/metadata/v1/zulu/packages?java_version=#{version.major}&os=macos&arch=#{arch}&archive_type=dmg&java_package_type=jdk&javafx_bundled=false&latest=true&release_status=ga&availability_types=ca"
|
|
regex(/zulu(\d+(?:[._]\d+)*)-ca-jdk(\d+(?:\.\d+)*)-macosx_#{arch}\.dmg/i)
|
|
strategy :json do |json, regex|
|
|
json.map do |item|
|
|
match = item["download_url"]&.match(regex)
|
|
next if match.blank?
|
|
|
|
"#{match[2]},#{match[1]}"
|
|
end
|
|
end
|
|
end
|
|
|
|
depends_on macos: ">= :mojave"
|
|
|
|
pkg "Double-Click to Install Azul Zulu JDK #{version.major}.pkg"
|
|
|
|
uninstall pkgutil: "com.azulsystems.zulu.#{version.major}"
|
|
|
|
zap trash: "~/Library/Saved Application State/com.azul.zulu.#{version.major}*.java.savedState"
|
|
end
|