From 3d0e7a6e1fb2eed51fe54e130e4dfb13f47ec9a6 Mon Sep 17 00:00:00 2001 From: Anusikh <56106489+anusikh@users.noreply.github.com> Date: Tue, 11 Jun 2024 16:11:25 +0530 Subject: [PATCH] feat: added linux ARM support and Java 22 (#14) * added linux ARM support and Java 22 * graal vm ARM support * updated README.md * upgraded patch version --- Cargo.toml | 2 +- README.md | 3 +- src/constants/versions.rs | 154 +++++++++++++++++++++++++++++--------- src/utils/env_ops.rs | 2 +- 4 files changed, 121 insertions(+), 40 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e983108..6193b97 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jvem" -version = "0.2.2" +version = "0.2.3" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/README.md b/README.md index c6a4930..6307a01 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,8 @@ To get started with JVeM, refer to the installation instructions and basic usage - Download the latest `jvem_linux.tar.gz` file from [Releases](https://github.com/anusikh/jvem/releases) - Extract the tarball file. -- Add this line to your zshrc/bashrc file: `PATH=$PATH:$HOME/.jvem/java/bin` and source it. +- Add this line to your zshrc/bashrc file: `PATH=$PATH:$HOME/.jvem/java/bin` +- Also add this line `JAVA_HOME=$HOME/.jvem/java` and then source the rc file - Add an alias to use jvem easily. `alias jvem=~/Downloads/jvem` ## Usage: diff --git a/src/constants/versions.rs b/src/constants/versions.rs index e6e7122..db9ce65 100644 --- a/src/constants/versions.rs +++ b/src/constants/versions.rs @@ -2,40 +2,84 @@ pub mod constants { pub const LINUX_ARTIFACT: &str = "jvem.tar.gz"; pub const WINDOWS_ARTIFACT: &str = "jvem.zip"; pub const AVAILABLE_VERSIONS: &str = - "ZULU8,ZULU11,ZULU17,ZULU21,OPENJDK11,OPENJDK17,OPENJDK21,GRAAL17,GRAAL21,GRAAL22"; + "ZULU8,ZULU11,ZULU17,ZULU21,ZULU22,OPENJDK11,OPENJDK17,OPENJDK21,OPENJDK22,GRAAL17,GRAAL21,GRAAL22"; // zulu jdk's - pub const ZULU21_LINUX: &str = + pub const ZULU22_LINUX_AARCH64: &str = + "https://cdn.azul.com/zulu/bin/zulu22.30.13-ca-jdk22.0.1-linux_aarch64.tar.gz"; + pub const ZULU22_LINUX_X86_64: &str = + "https://cdn.azul.com/zulu/bin/zulu22.30.13-ca-jdk22.0.1-linux_x64.tar.gz"; + pub const ZULU22_WINDOWS: &str = + "https://cdn.azul.com/zulu/bin/zulu22.30.13-ca-jdk22.0.1-win_x64.zip"; + pub const ZULU22_MACOS_AARCH64: &str = + "https://cdn.azul.com/zulu/bin/zulu22.30.13-ca-jdk22.0.1-macosx_aarch64.tar.gz"; + pub const ZULU22_MACOS_X86_64: &str = + "https://cdn.azul.com/zulu/bin/zulu22.30.13-ca-jdk22.0.1-macosx_x64.tar.gz"; + + pub const ZULU21_LINUX_X86_64: &str = "https://cdn.azul.com/zulu/bin/zulu21.32.17-ca-jdk21.0.2-linux_x64.tar.gz"; - pub const ZULU21_WINDOWS: &str = "https://cdn.azul.com/zulu/bin/zulu21.32.17-ca-jdk21.0.2-win_x64.zip?_gl=1*14dmzoc*_ga*MTg0NTAyMjU0LjE3MDg3MDUwMzU.*_ga_42DEGWGYD5*MTcwODcwNTAzNS4xLjEuMTcwODcwNTExMi40NC4wLjA."; - pub const ZULU21_MACOS_AARCH64: &str = "https://cdn.azul.com/zulu/bin/zulu21.32.17-ca-jdk21.0.2-macosx_aarch64.tar.gz?_gl=1*bqdjc4*_ga*MTU1MDc4NTgxMS4xNzA5NzU3MDc2*_ga_42DEGWGYD5*MTcwOTc1NzA3NS4xLjEuMTcwOTc1NzY1NC4zOC4wLjA."; - pub const ZULU21_MACOS_X86_64: &str = "https://cdn.azul.com/zulu/bin/zulu21.32.17-ca-jdk21.0.2-macosx_x64.tar.gz?_gl=1*1ku96gu*_ga*MTU1MDc4NTgxMS4xNzA5NzU3MDc2*_ga_42DEGWGYD5*MTcwOTc1NzA3NS4xLjEuMTcwOTc1NzU5OS4yOC4wLjA."; - pub const ZULU17_LINUX: &str = + pub const ZULU21_LINUX_AARCH64: &str = + "https://cdn.azul.com/zulu/bin/zulu21.32.17-ca-jdk21.0.2-linux_aarch64.tar.gz"; + pub const ZULU21_WINDOWS: &str = + "https://cdn.azul.com/zulu/bin/zulu21.32.17-ca-jdk21.0.2-win_x64.zip"; + pub const ZULU21_MACOS_AARCH64: &str = + "https://cdn.azul.com/zulu/bin/zulu21.32.17-ca-jdk21.0.2-macosx_aarch64.tar.gz"; + pub const ZULU21_MACOS_X86_64: &str = + "https://cdn.azul.com/zulu/bin/zulu21.32.17-ca-jdk21.0.2-macosx_x64.tar.gz"; + + pub const ZULU17_LINUX_X86_64: &str = "https://cdn.azul.com/zulu/bin/zulu17.48.15-ca-jdk17.0.10-linux_x64.tar.gz"; - pub const ZULU17_WINDOWS: &str = "https://cdn.azul.com/zulu/bin/zulu17.48.15-ca-jdk17.0.10-win_x64.zip?_gl=1*1nexba0*_ga*MTg0NTAyMjU0LjE3MDg3MDUwMzU.*_ga_42DEGWGYD5*MTcwODcwNTAzNS4xLjEuMTcwODcwNTE0Ny45LjAuMA.."; - pub const ZULU17_MACOS_AARCH64: &str = "https://cdn.azul.com/zulu/bin/zulu17.48.15-ca-jdk17.0.10-macosx_aarch64.tar.gz?_gl=1*ft6eo*_ga*MTU1MDc4NTgxMS4xNzA5NzU3MDc2*_ga_42DEGWGYD5*MTcwOTc1NzA3NS4xLjEuMTcwOTc1Nzg1Ni4zOC4wLjA."; - pub const ZULU17_MACOS_X86_64: &str = "https://cdn.azul.com/zulu/bin/zulu17.48.15-ca-jdk17.0.10-macosx_x64.tar.gz?_gl=1*s7p9be*_ga*MTU1MDc4NTgxMS4xNzA5NzU3MDc2*_ga_42DEGWGYD5*MTcwOTc1NzA3NS4xLjEuMTcwOTc1Nzg1Ni4zOC4wLjA."; - pub const ZULU11_LINUX: &str = + pub const ZULU17_LINUX_AARCH64: &str = + "https://cdn.azul.com/zulu/bin/zulu17.48.15-ca-jdk17.0.10-linux_aarch64.tar.gz"; + pub const ZULU17_WINDOWS: &str = + "https://cdn.azul.com/zulu/bin/zulu17.48.15-ca-jdk17.0.10-win_x64.zip"; + pub const ZULU17_MACOS_AARCH64: &str = + "https://cdn.azul.com/zulu/bin/zulu17.48.15-ca-jdk17.0.10-macosx_aarch64.tar.gz"; + pub const ZULU17_MACOS_X86_64: &str = + "https://cdn.azul.com/zulu/bin/zulu17.48.15-ca-jdk17.0.10-macosx_x64.tar.gz"; + + pub const ZULU11_LINUX_X86_64: &str = "https://cdn.azul.com/zulu/bin/zulu11.70.15-ca-jdk11.0.22-linux_x64.tar.gz"; - pub const ZULU11_WINDOWS: &str = "https://cdn.azul.com/zulu/bin/zulu11.70.15-ca-jdk11.0.22-win_x64.zip?_gl=1*2j7qzc*_ga*MTg0NTAyMjU0LjE3MDg3MDUwMzU.*_ga_42DEGWGYD5*MTcwODcwNTAzNS4xLjEuMTcwODcwNTIwNS4yNS4wLjA."; - pub const ZULU11_MACOS_AARCH64: &str = "https://cdn.azul.com/zulu/bin/zulu11.70.15-ca-jdk11.0.22-macosx_aarch64.tar.gz?_gl=1*1qf5npm*_ga*MTU1MDc4NTgxMS4xNzA5NzU3MDc2*_ga_42DEGWGYD5*MTcwOTc1NzA3NS4xLjEuMTcwOTc1Nzk5Ny40MC4wLjA."; - pub const ZULU11_MACOS_X86_64: &str = "https://cdn.azul.com/zulu/bin/zulu11.70.15-ca-jdk11.0.22-macosx_x64.tar.gz?_gl=1*10u3b0w*_ga*MTU1MDc4NTgxMS4xNzA5NzU3MDc2*_ga_42DEGWGYD5*MTcwOTc1NzA3NS4xLjEuMTcwOTc1Nzk5Ny40MC4wLjA."; - pub const ZULU8_LINUX: &str = - "https://cdn.azul.com/zulu/bin/zulu8.76.0.17-ca-jdk8.0.402-linux_i686.tar.gz"; - pub const ZULU8_WINDOWS: &str ="https://cdn.azul.com/zulu/bin/zulu8.76.0.17-ca-jdk8.0.402-win_x64.zip?_gl=1*i45ppb*_ga*MTg0NTAyMjU0LjE3MDg3MDUwMzU.*_ga_42DEGWGYD5*MTcwODcwNTAzNS4xLjEuMTcwODcwNTIxMy4xNy4wLjA."; - pub const ZULU8_MACOS_AARCH64: &str = "https://cdn.azul.com/zulu/bin/zulu8.76.0.17-ca-jdk8.0.402-macosx_aarch64.tar.gz?_gl=1*18knssl*_ga*MTU1MDc4NTgxMS4xNzA5NzU3MDc2*_ga_42DEGWGYD5*MTcwOTc1NzA3NS4xLjEuMTcwOTc1ODA1MS41MC4wLjA."; - pub const ZULU8_MACOS_X86_64: &str = "https://cdn.azul.com/zulu/bin/zulu8.76.0.17-ca-jdk8.0.402-macosx_x64.tar.gz?_gl=1*18knssl*_ga*MTU1MDc4NTgxMS4xNzA5NzU3MDc2*_ga_42DEGWGYD5*MTcwOTc1NzA3NS4xLjEuMTcwOTc1ODA1MS41MC4wLjA."; + pub const ZULU11_LINUX_AARCH64: &str = + "https://cdn.azul.com/zulu/bin/zulu11.70.15-ca-jdk11.0.22-linux_aarch64.tar.gz"; + pub const ZULU11_WINDOWS: &str = + "https://cdn.azul.com/zulu/bin/zulu11.70.15-ca-jdk11.0.22-win_x64.zip"; + pub const ZULU11_MACOS_AARCH64: &str = + "https://cdn.azul.com/zulu/bin/zulu11.70.15-ca-jdk11.0.22-macosx_aarch64.tar.gz"; + pub const ZULU11_MACOS_X86_64: &str = + "https://cdn.azul.com/zulu/bin/zulu11.70.15-ca-jdk11.0.22-macosx_x64.tar.gz"; + + pub const ZULU8_LINUX_X86_64: &str = + "https://cdn.azul.com/zulu/bin/zulu8.78.0.19-ca-jdk8.0.412-linux_x64.zip"; + pub const ZULU8_LINUX_AARCH64: &str = + "https://cdn.azul.com/zulu/bin/zulu8.78.0.19-ca-jdk8.0.412-linux_aarch64.tar.gz"; + pub const ZULU8_WINDOWS: &str = + "https://cdn.azul.com/zulu/bin/zulu8.76.0.17-ca-jdk8.0.402-win_x64.zip"; + pub const ZULU8_MACOS_AARCH64: &str = + "https://cdn.azul.com/zulu/bin/zulu8.76.0.17-ca-jdk8.0.402-macosx_aarch64.tar.gz"; + pub const ZULU8_MACOS_X86_64: &str = + "https://cdn.azul.com/zulu/bin/zulu8.76.0.17-ca-jdk8.0.402-macosx_x64.tar.gz"; // openjdk jdk's - pub const OPENJDK21_LINUX: &str = "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_linux-x64_bin.tar.gz"; + pub const OPENJDK22_LINUX_X86_64: &str = "https://download.java.net/java/GA/jdk22.0.1/c7ec1332f7bb44aeba2eb341ae18aca4/8/GPL/openjdk-22.0.1_linux-x64_bin.tar.gz"; + pub const OPENJDK22_LINUX_AARCH64: &str = "https://download.java.net/java/GA/jdk22.0.1/c7ec1332f7bb44aeba2eb341ae18aca4/8/GPL/openjdk-22.0.1_linux-aarch64_bin.tar.gz"; + pub const OPENJDK22_WINDOWS: &str = "https://download.java.net/java/GA/jdk22.0.1/c7ec1332f7bb44aeba2eb341ae18aca4/8/GPL/openjdk-22.0.1_windows-x64_bin.zip"; + pub const OPENJDK22_MACOS_AARCH64: &str = "https://download.java.net/java/GA/jdk22.0.1/c7ec1332f7bb44aeba2eb341ae18aca4/8/GPL/openjdk-22.0.1_macos-aarch64_bin.tar.gz"; + pub const OPENJDK22_MACOS_X86_64: &str = "https://download.java.net/java/GA/jdk22.0.1/c7ec1332f7bb44aeba2eb341ae18aca4/8/GPL/openjdk-22.0.1_macos-x64_bin.tar.gz"; + + pub const OPENJDK21_LINUX_X86_64: &str = "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_linux-x64_bin.tar.gz"; + pub const OPENJDK21_LINUX_AARCH64: &str = "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_linux-aarch64_bin.tar.gz"; pub const OPENJDK21_WINDOWS: &str = "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_windows-x64_bin.zip"; pub const OPENJDK21_MACOS_AARCH64: &str = "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_macos-aarch64_bin.tar.gz"; pub const OPENJDK21_MACOS_X86_64: &str = "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_macos-x64_bin.tar.gz"; - pub const OPENJDK17_LINUX: &str = "https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2_linux-x64_bin.tar.gz"; + + pub const OPENJDK17_LINUX_X86_64: &str = "https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2_linux-x64_bin.tar.gz"; + pub const OPENJDK17_LINUX_AARCH64: &str = "https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2_linux-aarch64_bin.tar.gz"; pub const OPENJDK17_WINDOWS: &str = "https://download.java.net/java/GA/jdk17.0.1/2a2082e5a09d4267845be086888add4f/12/GPL/openjdk-17.0.1_windows-x64_bin.zip"; pub const OPENJDK17_MACOS_AARCH64: &str = "https://download.java.net/java/GA/jdk17.0.1/2a2082e5a09d4267845be086888add4f/12/GPL/openjdk-17.0.1_macos-aarch64_bin.tar.gz"; pub const OPENJDK17_MACOS_X86_64: &str = "https://download.java.net/java/GA/jdk17.0.1/2a2082e5a09d4267845be086888add4f/12/GPL/openjdk-17.0.1_macos-x64_bin.tar.gz"; - pub const OPENJDK11_LINUX: &str = + + pub const OPENJDK11_LINUX_X86_64: &str = "https://download.java.net/java/GA/jdk11/13/GPL/openjdk-11.0.1_linux-x64_bin.tar.gz"; pub const OPENJDK11_WINDOWS: &str = "https://download.java.net/java/GA/jdk11/13/GPL/openjdk-11.0.1_windows-x64_bin.zip"; @@ -43,24 +87,32 @@ pub mod constants { "https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_osx-x64_bin.tar.gz"; // graalvm jdk's - pub const GRAAL22_LINUX: &str = + pub const GRAAL22_LINUX_X86_64: &str = "https://download.oracle.com/graalvm/22/latest/graalvm-jdk-22_linux-x64_bin.tar.gz"; + pub const GRAAL22_LINUX_AARCH64: &str = + "https://download.oracle.com/graalvm/22/latest/graalvm-jdk-22_linux-aarch64_bin.tar.gz"; pub const GRAAL22_WINDOWS: &str = "https://download.oracle.com/graalvm/22/latest/graalvm-jdk-22_windows-x64_bin.zip"; pub const GRAAL22_MACOS_AARCH64: &str = "https://download.oracle.com/graalvm/22/latest/graalvm-jdk-22_macos-aarch64_bin.tar.gz"; pub const GRAAL22_MACOS_X86_64: &str = "https://download.oracle.com/graalvm/22/latest/graalvm-jdk-22_macos-x64_bin.tar.gz"; - pub const GRAAL21_LINUX: &str = + + pub const GRAAL21_LINUX_X86_64: &str = "https://download.oracle.com/graalvm/21/latest/graalvm-jdk-21_linux-x64_bin.tar.gz"; + pub const GRAAL21_LINUX_AARCH64: &str = + "https://download.oracle.com/graalvm/21/latest/graalvm-jdk-21_linux-aarch64_bin.tar.gz"; pub const GRAAL21_WINDOWS: &str = "https://download.oracle.com/graalvm/21/latest/graalvm-jdk-21_windows-x64_bin.zip"; pub const GRAAL21_MACOS_AARCH64: &str = "https://download.oracle.com/graalvm/21/latest/graalvm-jdk-21_macos-aarch64_bin.tar.gz"; pub const GRAAL21_MACOS_X86_64: &str = "https://download.oracle.com/graalvm/21/latest/graalvm-jdk-21_macos-x64_bin.tar.gz"; - pub const GRAAL17_LINUX: &str = + + pub const GRAAL17_LINUX_X86_64: &str = "https://download.oracle.com/graalvm/17/latest/graalvm-jdk-17_linux-x64_bin.tar.gz"; + pub const GRAAL17_LINUX_AARCH64: &str = + "https://download.oracle.com/graalvm/17/latest/graalvm-jdk-17_linux-aarch64_bin.tar.gz"; pub const GRAAL17_WINDOWS: &str = "https://download.oracle.com/graalvm/17/latest/graalvm-jdk-17_windows-x64_bin.zip"; pub const GRAAL17_MACOS_AARCH64: &str = @@ -75,46 +127,74 @@ pub mod constants { "AVAILABLE_VERSIONS" => Some(AVAILABLE_VERSIONS), // zulu jdk's - "ZULU21_LINUX" => Some(ZULU21_LINUX), + "ZULU22_LINUX_X86_64" => Some(ZULU22_LINUX_X86_64), + "ZULU22_LINUX_AARCH64" => Some(ZULU22_LINUX_AARCH64), + "ZULU22_WINDOWS" => Some(ZULU22_WINDOWS), + "ZULU22_MACOS_AARCH64" => Some(ZULU22_MACOS_AARCH64), + "ZULU22_MACOS_X86_64" => Some(ZULU22_MACOS_X86_64), + + "ZULU21_LINUX_X86_64" => Some(ZULU21_LINUX_X86_64), + "ZULU21_LINUX_AARCH64" => Some(ZULU21_LINUX_AARCH64), "ZULU21_WINDOWS" => Some(ZULU21_WINDOWS), - "ZULU17_LINUX" => Some(ZULU17_LINUX), - "ZULU17_WINDOWS" => Some(ZULU17_WINDOWS), - "ZULU11_LINUX" => Some(ZULU11_LINUX), - "ZULU11_WINDOWS" => Some(ZULU11_WINDOWS), - "ZULU8_LINUX" => Some(ZULU8_LINUX), - "ZULU8_WINDOWS" => Some(ZULU8_WINDOWS), "ZULU21_MACOS_AARCH64" => Some(ZULU21_MACOS_AARCH64), "ZULU21_MACOS_X86_64" => Some(ZULU21_MACOS_X86_64), + + "ZULU17_LINUX_X86_64" => Some(ZULU17_LINUX_X86_64), + "ZULU17_LINUX_AARCH64" => Some(ZULU17_LINUX_AARCH64), + "ZULU17_WINDOWS" => Some(ZULU17_WINDOWS), "ZULU17_MACOS_AARCH64" => Some(ZULU17_MACOS_AARCH64), "ZULU17_MACOS_X86_64" => Some(ZULU17_MACOS_X86_64), + + "ZULU11_LINUX_X86_64" => Some(ZULU11_LINUX_X86_64), + "ZULU11_LINUX_AARCH64" => Some(ZULU11_LINUX_AARCH64), + "ZULU11_WINDOWS" => Some(ZULU11_WINDOWS), "ZULU11_MACOS_AARCH64" => Some(ZULU11_MACOS_AARCH64), "ZULU11_MACOS_X86_64" => Some(ZULU11_MACOS_X86_64), + + "ZULU8_LINUX_X86_64" => Some(ZULU8_LINUX_X86_64), + "ZULU8_LINUX_AARCH64" => Some(ZULU8_LINUX_AARCH64), + "ZULU8_WINDOWS" => Some(ZULU8_WINDOWS), "ZULU8_MACOS_AARCH64" => Some(ZULU8_MACOS_AARCH64), "ZULU8_MACOS_X86_64" => Some(ZULU8_MACOS_X86_64), // openjdk jdk's - "OPENJDK21_LINUX" => Some(OPENJDK21_LINUX), + "OPENJDK22_LINUX_X86_64" => Some(OPENJDK22_LINUX_X86_64), + "OPENJDK22_LINUX_AARCH64" => Some(OPENJDK22_LINUX_AARCH64), + "OPENJDK22_WINDOWS" => Some(OPENJDK22_WINDOWS), + "OPENJDK22_MACOS_AARCH64" => Some(OPENJDK22_MACOS_AARCH64), + "OPENJDK22_MACOS_X86_64" => Some(OPENJDK22_MACOS_X86_64), + + "OPENJDK21_LINUX_X86_64" => Some(OPENJDK21_LINUX_X86_64), + "OPENJDK21_LINUX_AARCH64" => Some(OPENJDK21_LINUX_AARCH64), "OPENJDK21_WINDOWS" => Some(OPENJDK21_WINDOWS), "OPENJDK21_MACOS_AARCH64" => Some(OPENJDK21_MACOS_AARCH64), "OPENJDK21_MACOS_X86_64" => Some(OPENJDK21_MACOS_X86_64), - "OPENJDK17_LINUX" => Some(OPENJDK17_LINUX), + + "OPENJDK17_LINUX_X86_64" => Some(OPENJDK17_LINUX_X86_64), + "OPENJDK17_LINUX_AARCH64" => Some(OPENJDK21_LINUX_AARCH64), "OPENJDK17_WINDOWS" => Some(OPENJDK17_WINDOWS), "OPENJDK17_MACOS_AARCH64" => Some(OPENJDK17_MACOS_AARCH64), "OPENJDK17_MACOS_X86_64" => Some(OPENJDK17_MACOS_X86_64), - "OPENJDK11_LINUX" => Some(OPENJDK11_LINUX), + + "OPENJDK11_LINUX_X86_64" => Some(OPENJDK11_LINUX_X86_64), "OPENJDK11_WINDOWS" => Some(OPENJDK11_WINDOWS), "OPENJDK11_MACOS_X86_64" => Some(OPENJDK11_MACOS_X86_64), // graalvm jdk's - "GRAAL22_LINUX" => Some(GRAAL22_LINUX), + "GRAAL22_LINUX_X86_64" => Some(GRAAL22_LINUX_X86_64), + "GRAAL22_LINUX_AARCH64" => Some(GRAAL22_LINUX_AARCH64), "GRAAL22_WINDOWS" => Some(GRAAL22_WINDOWS), "GRAAL22_MACOS_AARCH64" => Some(GRAAL22_MACOS_AARCH64), "GRAAL22_MACOS_X86_64" => Some(GRAAL22_MACOS_X86_64), - "GRAAL21_LINUX" => Some(GRAAL21_LINUX), + + "GRAAL21_LINUX_X86_64" => Some(GRAAL21_LINUX_X86_64), + "GRAAL21_LINUX_AARCH64" => Some(GRAAL21_LINUX_AARCH64), "GRAAL21_WINDOWS" => Some(GRAAL21_WINDOWS), "GRAAL21_MACOS_AARCH64" => Some(GRAAL21_MACOS_AARCH64), "GRAAL21_MACOS_X86_64" => Some(GRAAL21_MACOS_X86_64), - "GRAAL17_LINUX" => Some(GRAAL17_LINUX), + + "GRAAL17_LINUX_X86_64" => Some(GRAAL17_LINUX_X86_64), + "GRAAL17_LINUX_AARCH64" => Some(GRAAL17_LINUX_AARCH64), "GRAAL17_WINDOWS" => Some(GRAAL17_WINDOWS), "GRAAL17_MACOS_AARCH64" => Some(GRAAL17_MACOS_AARCH64), "GRAAL17_MACOS_X86_64" => Some(GRAAL17_MACOS_X86_64), diff --git a/src/utils/env_ops.rs b/src/utils/env_ops.rs index 7946924..eef60aa 100644 --- a/src/utils/env_ops.rs +++ b/src/utils/env_ops.rs @@ -18,7 +18,7 @@ pub fn get_download_link( arch: &str, ) -> Result> { let mut env_var_name = format!("{}_{}", name.to_uppercase(), os.to_uppercase()); - if os == "macos" { + if os == "macos" || os == "linux" { env_var_name = format!( "{}_{}_{}", name.to_uppercase(),