cask "semeru-jdk-open" do arch arm: "aarch64", intel: "x64" version "23.0.1,11,openj9-0.48.0" sha256 arm: "223e33f23ef97ccacc3d6f719d3b8988bae612e4e7923de31b044b5f5d5281c9", intel: "49d87640c0a7739681b68ec56f800623eee56fd9f949d99b2cf7239f3427c1a8" url "https://github.com/ibmruntimes/semeru#{version.major}-binaries/releases/download/jdk-#{version.csv.first}%2B#{version.csv.second}_#{version.csv.third}/ibm-semeru-open-jdk_#{arch}_mac_#{version.csv.first}_#{version.csv.second}_#{version.csv.third}.pkg", verified: "github.com/ibmruntimes/" name "IBM Semeru Runtime (JDK) Open Edition" desc "Production-ready JDK with the OpenJDK class libraries and the Eclipse OpenJ9 JVM" homepage "https://developer.ibm.com/languages/java/semeru-runtimes" livecheck do url :url regex(/^jdk[._-](\d+[\.\d+]*)[+](\d+)[._-](.+?)$/i) strategy :github_latest do |json, regex| json["tag_name"]&.scan(regex)&.map { |match| "#{match[0]},#{match[1]},#{match[2]}" } end end pkg "ibm-semeru-open-jdk_#{arch}_mac_#{version.csv.first}_#{version.csv.second}_#{version.csv.third}.pkg" uninstall pkgutil: "net.ibm-semeru-open.#{version.major}.jdk" # No zap stanza required end