Skip to content

Commit

Permalink
Semeru: Try new syntax on old cask
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Brousseau <[email protected]>
  • Loading branch information
AdamBrousseau committed Sep 18, 2024
1 parent 6fe8ae8 commit bba10ab
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Casks/s/[email protected]
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
cask "semeru-jdk-open@22" do
arch arm: "aarch64", intel: "x64"

version "22.0.2+9,openj9-0.46.1"
version "22.0.2,9,openj9-0.46.1"
sha256 arm: "f59899423427cc91fec67f107d69fcf1050e421998a1f5cd6a0917ead54e5dc9",
intel: "529754faa471cbbe40e36fc475dcd8e6f2179ee972ac2eb14117c1b58c119153"

url "https://github.com/ibmruntimes/semeru#{version.major}-binaries/releases/download/jdk-#{version.csv.first}_#{version.csv.second}/ibm-semeru-open-jdk_#{arch}_mac_#{version.csv.first.tr("+", "_")}_#{version.csv.second}.pkg",
url "https://github.com/ibmruntimes/semeru#{version.csv.first}-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+)*)[._-](.+?)$/i)
regex(/^jdk[._-](\d+)(?:[.+](\d+)*)[._-](.+?)$/i)
strategy :github_latest do |json, regex|
json["tag_name"]&.scan(regex)&.map { |match| "#{match[0]},#{match[1]}" }
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.tr("+", "_")}_#{version.csv.second}.pkg"
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"
uninstall pkgutil: "net.ibm-semeru-open.#{version.csv.first}.jdk"

# No zap stanza required
end

0 comments on commit bba10ab

Please sign in to comment.