From 15bee9c6fa300bf639cbb0272957114b4bff9d5d Mon Sep 17 00:00:00 2001 From: Mark Evenson Date: Tue, 12 Mar 2024 08:32:26 +0100 Subject: [PATCH] ci: moar attempts --- ci/ensure-jenv-is-present.bash | 2 ++ ci/install-jenv.bash | 2 +- ci/install-openjdk.bash | 7 +++---- ci/set-jdk.bash | 4 +++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ci/ensure-jenv-is-present.bash b/ci/ensure-jenv-is-present.bash index eb6ec27fd..eff7f1c14 100644 --- a/ci/ensure-jenv-is-present.bash +++ b/ci/ensure-jenv-is-present.bash @@ -1,3 +1,5 @@ +#!/usr/bin/env bash + export JENV_ROOT=$HOME/.jenv if [[ $(echo $PATH | grep -c .jenv) -eq 0 ]]; then export PATH="$JENV_ROOT/bin:$PATH" diff --git a/ci/install-jenv.bash b/ci/install-jenv.bash index 4982f950b..6338babb5 100644 --- a/ci/install-jenv.bash +++ b/ci/install-jenv.bash @@ -13,7 +13,7 @@ fi # jenv enable-plugin maven # jenv enable-plugin export -jenv doctor +#jenv doctor diff --git a/ci/install-openjdk.bash b/ci/install-openjdk.bash index f6705fb9c..211827189 100644 --- a/ci/install-openjdk.bash +++ b/ci/install-openjdk.bash @@ -2,8 +2,6 @@ set -euo pipefail DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -. ${DIR}/install-jenv.bash -# try this... . ${DIR}/ensure-jenv-is-present.bash jdk=$1 @@ -11,8 +9,9 @@ if [[ -z $jdk ]]; then jdk=openjdk8 fi -uname=$2 -if [[ -z $uname ]]; then +if [[ $# -eq 2 ]]; then + uname=$2 +else uname=$(uname) fi diff --git a/ci/set-jdk.bash b/ci/set-jdk.bash index c929aa2b6..06ef0df8f 100644 --- a/ci/set-jdk.bash +++ b/ci/set-jdk.bash @@ -35,6 +35,9 @@ function set_jdk() { openjdk20) version=$(jenv versions | grep ^\ *20\.[0-9] | tail -1 | sed s/*//) ;; + openjdk21) + version=$(jenv versions | grep ^\ *21\.[0-9] | tail -1 | sed s/*//) + ;; *) echo Failed to find an available JDK matching ${abcl_jdk} echo in $(jenv versions) @@ -63,4 +66,3 @@ function set_jdk() { popd } -set_jdk ${ABCL_JDK} ${ABCL_ROOT}