diff --git a/.github/workflows/jdk10.yml b/.github/workflows/jdk10.yml index b648284..a0add13 100644 --- a/.github/workflows/jdk10.yml +++ b/.github/workflows/jdk10.yml @@ -16,9 +16,16 @@ on: jobs: - build: - name: Build - runs-on: macos-latest + check: + name: Check + strategy: + matrix: + os: + # macos-latest is based on arm64. + - macos-latest + # macos-12 is based on x64. + - macos-12 + runs-on: ${{ matrix.os }} env: HOMEBREW_COLOR: 1 HOMEBREW_DEVELOPER: 1 diff --git a/.github/workflows/jdk11.yml b/.github/workflows/jdk11.yml index bd26a94..901a4a4 100644 --- a/.github/workflows/jdk11.yml +++ b/.github/workflows/jdk11.yml @@ -16,9 +16,16 @@ on: jobs: - build: - name: Build - runs-on: macos-latest + check: + name: Check + strategy: + matrix: + os: + # macos-latest is based on arm64. + - macos-latest + # macos-12 is based on x64. + - macos-12 + runs-on: ${{ matrix.os }} env: HOMEBREW_COLOR: 1 HOMEBREW_DEVELOPER: 1 diff --git a/.github/workflows/jdk13.yml b/.github/workflows/jdk13.yml index 6918f7e..d8fb635 100644 --- a/.github/workflows/jdk13.yml +++ b/.github/workflows/jdk13.yml @@ -16,9 +16,16 @@ on: jobs: - build: - name: Build - runs-on: macos-latest + check: + name: Check + strategy: + matrix: + os: + # macos-latest is based on arm64. + - macos-latest + # macos-12 is based on x64. + - macos-12 + runs-on: ${{ matrix.os }} env: HOMEBREW_COLOR: 1 HOMEBREW_DEVELOPER: 1 diff --git a/.github/workflows/jdk14.yml b/.github/workflows/jdk14.yml index 0e82c78..8715c37 100644 --- a/.github/workflows/jdk14.yml +++ b/.github/workflows/jdk14.yml @@ -16,9 +16,16 @@ on: jobs: - build: - name: Build - runs-on: macos-latest + check: + name: Check + strategy: + matrix: + os: + # macos-latest is based on arm64. + - macos-latest + # macos-12 is based on x64. + - macos-12 + runs-on: ${{ matrix.os }} env: HOMEBREW_COLOR: 1 HOMEBREW_DEVELOPER: 1 diff --git a/.github/workflows/jdk15.yml b/.github/workflows/jdk15.yml index 83df7d6..2e01c2e 100644 --- a/.github/workflows/jdk15.yml +++ b/.github/workflows/jdk15.yml @@ -16,9 +16,16 @@ on: jobs: - build: - name: Build - runs-on: macos-latest + check: + name: Check + strategy: + matrix: + os: + # macos-latest is based on arm64. + - macos-latest + # macos-12 is based on x64. + - macos-12 + runs-on: ${{ matrix.os }} env: HOMEBREW_COLOR: 1 HOMEBREW_DEVELOPER: 1 diff --git a/.github/workflows/jdk16.yml b/.github/workflows/jdk16.yml index 04e8ed4..f45f9f0 100644 --- a/.github/workflows/jdk16.yml +++ b/.github/workflows/jdk16.yml @@ -16,9 +16,16 @@ on: jobs: - build: - name: Build - runs-on: macos-latest + check: + name: Check + strategy: + matrix: + os: + # macos-latest is based on arm64. + - macos-latest + # macos-12 is based on x64. + - macos-12 + runs-on: ${{ matrix.os }} env: HOMEBREW_COLOR: 1 HOMEBREW_DEVELOPER: 1 diff --git a/.github/workflows/jdk17.yml b/.github/workflows/jdk17.yml index 57d1690..97f74a0 100755 --- a/.github/workflows/jdk17.yml +++ b/.github/workflows/jdk17.yml @@ -16,9 +16,16 @@ on: jobs: - build: - name: Build - runs-on: macos-latest + check: + name: Check + strategy: + matrix: + os: + # macos-latest is based on arm64. + - macos-latest + # macos-12 is based on x64. + - macos-12 + runs-on: ${{ matrix.os }} env: HOMEBREW_COLOR: 1 HOMEBREW_DEVELOPER: 1 diff --git a/.github/workflows/jdk18.yml b/.github/workflows/jdk18.yml index c99e8ee..b6263af 100644 --- a/.github/workflows/jdk18.yml +++ b/.github/workflows/jdk18.yml @@ -16,9 +16,16 @@ on: jobs: - build: - name: Build - runs-on: macos-latest + check: + name: Check + strategy: + matrix: + os: + # macos-latest is based on arm64. + - macos-latest + # macos-12 is based on x64. + - macos-12 + runs-on: ${{ matrix.os }} env: HOMEBREW_COLOR: 1 HOMEBREW_DEVELOPER: 1 diff --git a/.github/workflows/jdk19.yml b/.github/workflows/jdk19.yml index 2b6b71d..2424f39 100644 --- a/.github/workflows/jdk19.yml +++ b/.github/workflows/jdk19.yml @@ -16,9 +16,16 @@ on: jobs: - build: - name: Build - runs-on: macos-latest + check: + name: Check + strategy: + matrix: + os: + # macos-latest is based on arm64. + - macos-latest + # macos-12 is based on x64. + - macos-12 + runs-on: ${{ matrix.os }} env: HOMEBREW_COLOR: 1 HOMEBREW_DEVELOPER: 1 diff --git a/.github/workflows/jdk21.yml b/.github/workflows/jdk21.yml index cb6dfa1..b708f82 100644 --- a/.github/workflows/jdk21.yml +++ b/.github/workflows/jdk21.yml @@ -16,9 +16,16 @@ on: jobs: - build: - name: Build - runs-on: macos-latest + check: + name: Check + strategy: + matrix: + os: + # macos-latest is based on arm64. + - macos-latest + # macos-12 is based on x64. + - macos-12 + runs-on: ${{ matrix.os }} env: HOMEBREW_COLOR: 1 HOMEBREW_DEVELOPER: 1 diff --git a/.github/workflows/jdk22.yml b/.github/workflows/jdk22.yml index a7c94f7..2914955 100644 --- a/.github/workflows/jdk22.yml +++ b/.github/workflows/jdk22.yml @@ -16,9 +16,16 @@ on: jobs: - build: - name: Build - runs-on: macos-latest + check: + name: Check + strategy: + matrix: + os: + # macos-latest is based on arm64. + - macos-latest + # macos-12 is based on x64. + - macos-12 + runs-on: ${{ matrix.os }} env: HOMEBREW_COLOR: 1 HOMEBREW_DEVELOPER: 1 diff --git a/.github/workflows/jdk7.yml b/.github/workflows/jdk7.yml index 60c3599..abf5016 100644 --- a/.github/workflows/jdk7.yml +++ b/.github/workflows/jdk7.yml @@ -16,9 +16,16 @@ on: jobs: - build: - name: Build - runs-on: macos-latest + check: + name: Check + strategy: + matrix: + os: + # macos-latest is based on arm64. + - macos-latest + # macos-12 is based on x64. + - macos-12 + runs-on: ${{ matrix.os }} env: HOMEBREW_COLOR: 1 HOMEBREW_DEVELOPER: 1 diff --git a/.github/workflows/jdk8.yml b/.github/workflows/jdk8.yml index 522153b..79e2b61 100644 --- a/.github/workflows/jdk8.yml +++ b/.github/workflows/jdk8.yml @@ -16,9 +16,16 @@ on: jobs: - build: - name: Build - runs-on: macos-latest + check: + name: Check + strategy: + matrix: + os: + # macos-latest is based on arm64. + - macos-latest + # macos-12 is based on x64. + - macos-12 + runs-on: ${{ matrix.os }} env: HOMEBREW_COLOR: 1 HOMEBREW_DEVELOPER: 1 diff --git a/.github/workflows/jdk9.yml b/.github/workflows/jdk9.yml index 8e4ea06..fa41783 100644 --- a/.github/workflows/jdk9.yml +++ b/.github/workflows/jdk9.yml @@ -16,9 +16,16 @@ on: jobs: - build: - name: Build - runs-on: macos-latest + check: + name: Check + strategy: + matrix: + os: + # macos-latest is based on arm64. + - macos-latest + # macos-12 is based on x64. + - macos-12 + runs-on: ${{ matrix.os }} env: HOMEBREW_COLOR: 1 HOMEBREW_DEVELOPER: 1 diff --git a/Casks/zulu-jdk11.rb b/Casks/zulu-jdk11.rb index 4db2bd0..25aecaf 100644 --- a/Casks/zulu-jdk11.rb +++ b/Casks/zulu-jdk11.rb @@ -1,6 +1,6 @@ cask 'zulu-jdk11' do - if Hardware::CPU.intel? + on_intel do version '11.74.15,11.0.24' sha256 '7c8e9cc1ee9b62f3faa902fae0f860578d833d2f0c9cd7c8a1ea84b6fd4cddf1' @@ -8,7 +8,8 @@ referer: 'https://www.azul.com/downloads/zulu-community/' depends_on macos: '>= :mojave' - else + end + on_arm do version '11.74.15,11.0.24' sha256 'cc3848ec9a540ed445f21264a05d82f2a8207e26f0e4a311fed23550873468f8' diff --git a/Casks/zulu-jdk13.rb b/Casks/zulu-jdk13.rb index 31ea35d..3a5b8b3 100644 --- a/Casks/zulu-jdk13.rb +++ b/Casks/zulu-jdk13.rb @@ -1,6 +1,6 @@ cask 'zulu-jdk13' do - if Hardware::CPU.intel? + on_intel do version '13.54.17,13.0.14' sha256 'e83a0fb55f3d736c88d9fff33ee6c4a11901507a932477df15bed220c84714c4' @@ -8,7 +8,8 @@ referer: 'https://www.azul.com/downloads/zulu-community/' depends_on macos: '>= :mojave' - else + end + on_arm do version '13.54.17,13.0.14' sha256 'b7b41f43f6a76f84d579e1d7b4abfd536928b6472e0ca3a8188f474235137b8e' diff --git a/Casks/zulu-jdk15.rb b/Casks/zulu-jdk15.rb index ba27497..4452cb4 100644 --- a/Casks/zulu-jdk15.rb +++ b/Casks/zulu-jdk15.rb @@ -1,6 +1,6 @@ cask 'zulu-jdk15' do - if Hardware::CPU.intel? + on_intel do version '15.46.17,15.0.10' sha256 '9e8a2b162826af9ac9db248e4c9e7a8983bbe31ae63686a19a3c291770f9427c' @@ -8,7 +8,8 @@ referer: 'https://www.azul.com/downloads/zulu-community/' depends_on macos: '>= :mojave' - else + end + on_arm do version '15.46.17,15.0.10' sha256 'f5d123cd149f245792d0d807086f4c58c493bd52db8162ed2d2609f97e493ac1' diff --git a/Casks/zulu-jdk16.rb b/Casks/zulu-jdk16.rb index c10de25..e37bd29 100644 --- a/Casks/zulu-jdk16.rb +++ b/Casks/zulu-jdk16.rb @@ -1,6 +1,6 @@ cask 'zulu-jdk16' do - if Hardware::CPU.intel? + on_intel do version '16.32.15,16.0.2' sha256 '59dcf9c1c5ac4acbf27319c2dfb38fd26c97663dbac1a1d931fb94cec6864de2' @@ -8,7 +8,8 @@ referer: 'https://www.azul.com/downloads/zulu-community/' depends_on macos: '>= :mojave' - else + end + on_arm do version '16.32.15,16.0.2' sha256 'f6c6ff8d6afdb45040ef8dac4b0c0798f4938bd10e82b0edd54bfd58e8b74032' diff --git a/Casks/zulu-jdk17.rb b/Casks/zulu-jdk17.rb index 5f50ccd..ba3dae1 100755 --- a/Casks/zulu-jdk17.rb +++ b/Casks/zulu-jdk17.rb @@ -1,6 +1,6 @@ cask 'zulu-jdk17' do - if Hardware::CPU.intel? + on_intel do version '17.52.17,17.0.12' sha256 '695cf191aedfa6e159d7ed6825de66a6124af1886cbb4f3bb6d2478fce8e528c' @@ -8,7 +8,8 @@ referer: 'https://www.azul.com/downloads/zulu-community/' depends_on macos: '>= :mojave' - else + end + on_arm do version '17.52.17,17.0.12' sha256 '807ecb2a1cf69723ac03aaec2883dbe54d5537ae1c245c4de6d3d2ece56d29b5' diff --git a/Casks/zulu-jdk18.rb b/Casks/zulu-jdk18.rb index 797d387..242698f 100644 --- a/Casks/zulu-jdk18.rb +++ b/Casks/zulu-jdk18.rb @@ -1,6 +1,6 @@ cask 'zulu-jdk18' do - if Hardware::CPU.intel? + on_intel do version '18.32.13,18.0.2.1' sha256 'fdba26f51f1f8a82cb1e084bc11c65136fca5cb5f653146c8e575787ca9fab34' @@ -8,7 +8,8 @@ referer: 'https://www.azul.com/downloads/zulu-community/' depends_on macos: '>= :mojave' - else + end + on_arm do version '18.32.13,18.0.2.1' sha256 'aa25a85a8a3e51b2a532753aaf1c8151f8af671d8885c4cc1e245cc2de523f6c' diff --git a/Casks/zulu-jdk19.rb b/Casks/zulu-jdk19.rb index ad2dd3e..f4fe47d 100644 --- a/Casks/zulu-jdk19.rb +++ b/Casks/zulu-jdk19.rb @@ -1,6 +1,6 @@ cask 'zulu-jdk19' do - if Hardware::CPU.intel? + on_intel do version '19.32.13,19.0.2' sha256 '44a4fad67f32f7e7a886ffce0d7d523de30b552e8e81c1e25af5c2fdef762f66' @@ -8,7 +8,8 @@ referer: 'https://www.azul.com/downloads/zulu-community/' depends_on macos: '>= :mojave' - else + end + on_arm do version '19.32.13,19.0.2' sha256 '12f7ae5c2734962255ca0bb47ce71c0bae34720e6af1f84377250ff074bd907a' diff --git a/Casks/zulu-jdk21.rb b/Casks/zulu-jdk21.rb index 0bc6083..7bfc2dd 100644 --- a/Casks/zulu-jdk21.rb +++ b/Casks/zulu-jdk21.rb @@ -1,6 +1,6 @@ cask 'zulu-jdk21' do - if Hardware::CPU.intel? + on_intel do version '21.36.17,21.0.4' sha256 'cdb86b1000a4c9ad7d7e1559f50d96447c178b144768c4153fe5312755c5d513' @@ -8,7 +8,8 @@ referer: 'https://www.azul.com/downloads/zulu-community/' depends_on macos: '>= :mojave' - else + end + on_arm do version '21.36.17,21.0.4' sha256 '4f513a2b9d89910f21e8257e3ee54845551de86e3dc4da6d37e3aa5e4305027f' diff --git a/Casks/zulu-jdk22.rb b/Casks/zulu-jdk22.rb index e4709a5..bae1f2e 100644 --- a/Casks/zulu-jdk22.rb +++ b/Casks/zulu-jdk22.rb @@ -1,6 +1,6 @@ cask 'zulu-jdk22' do - if Hardware::CPU.intel? + on_intel do version '22.32.15,22.0.2' sha256 'da90a3495a0f4b1e1e1d321488012ad141250422dcda11d6ceaa09511b59533a' @@ -8,7 +8,8 @@ referer: 'https://www.azul.com/downloads/zulu-community/' depends_on macos: '>= :mojave' - else + end + on_arm do version '22.32.15,22.0.2' sha256 '0f68c5fca1bf249aa57ffbeb2619daa0609208559a6a93c62329c76f301d7ace' diff --git a/Casks/zulu-jdk8.rb b/Casks/zulu-jdk8.rb index 0ee4c97..b74dbce 100644 --- a/Casks/zulu-jdk8.rb +++ b/Casks/zulu-jdk8.rb @@ -1,6 +1,6 @@ cask 'zulu-jdk8' do - if Hardware::CPU.intel? + on_intel do version '8.80.0.17,8.0.422' sha256 '9245a081d1a868e84655264c687ba615814ea2dc7ed73586ef7cbf0487f95272' @@ -8,7 +8,8 @@ referer: 'https://www.azul.com/downloads/zulu-community/' depends_on macos: '>= :mojave' - else + end + on_arm do version '8.80.0.17,8.0.422' sha256 'ac209ca5cdac5386271572bbf287298483d12dd079fe01323d62353ae1418f43' diff --git a/updater/src/main/java/Main.java b/updater/src/main/java/Main.java index 5108fcd..4690a61 100644 --- a/updater/src/main/java/Main.java +++ b/updater/src/main/java/Main.java @@ -53,7 +53,7 @@ public static void main(String... args) throws IOException { w.writeUtf8("cask 'zulu-jdk" + jdkVersion + "' do\n\n"); if (armPackage != null) { - w.writeUtf8(" if Hardware::CPU.intel?\n"); + w.writeUtf8(" on_intel do\n"); } w.writeUtf8(" version '" + x86Package.caskVersion() + "'\n"); @@ -63,7 +63,8 @@ public static void main(String... args) throws IOException { w.writeUtf8(" depends_on macos: '>= :mojave'\n"); if (armPackage != null) { - w.writeUtf8(" else\n"); + w.writeUtf8(" end\n"); + w.writeUtf8(" on_arm do\n"); w.writeUtf8(" version '" + armPackage.caskVersion() + "'\n"); w.writeUtf8(" sha256 '" + armPackage.sha256_hash + "'\n\n"); w.writeUtf8(" url '" + armPackage.download_url + "',\n"); @@ -235,9 +236,16 @@ default Package getPackageDetails(int version, String architecture) throws IOExc jobs: - build: - name: Build - runs-on: macos-latest + check: + name: Check + strategy: + matrix: + os: + # macos-latest is based on arm64. + - macos-latest + # macos-12 is based on x64. + - macos-12 + runs-on: ${{ matrix.os }} env: HOMEBREW_COLOR: 1 HOMEBREW_DEVELOPER: 1