From 054d5e118a71025415204901980c72bee4e2b8d1 Mon Sep 17 00:00:00 2001 From: Michal Karm Babacek Date: Mon, 23 Sep 2024 18:23:43 +0200 Subject: [PATCH] Macos related updates, mandrel_linux_build.sh from f1e209e --- jenkins/jobs/scripts/mandrel_linux_build.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jenkins/jobs/scripts/mandrel_linux_build.sh b/jenkins/jobs/scripts/mandrel_linux_build.sh index 67a301e5..4fb8b279 100755 --- a/jenkins/jobs/scripts/mandrel_linux_build.sh +++ b/jenkins/jobs/scripts/mandrel_linux_build.sh @@ -7,7 +7,11 @@ export JAVA_HOME=/usr/java/${OPENJDK} export MX_HOME=${WORKSPACE}/mx export PATH=${JAVA_HOME}/bin:${MX_HOME}:${PATH} pushd mandrel -export JAVA_VERSION="$(java --version | sed -e 's/.*build \([^) ]*\)).*/\1/;t;d' )" +if [[ "$(uname)" =~ "Darwin" ]]; then + export JAVA_VERSION="$(java --version | sed -n '2s/.*build \([^)]*\)).*/\1/p')" +else + export JAVA_VERSION="$(java --version | sed -e 's/.*build \([^) ]*\)).*/\1/;t;d' )" +fi popd ${JAVA_HOME}/bin/java -ea build.java --maven-local-repository ${MAVEN_REPO} \ --mandrel-repo ${MANDREL_REPO} --mx-home ${MX_HOME} \ @@ -25,7 +29,7 @@ if [[ ! -e "${MANDREL_HOME}/bin/native-image" ]]; then echo "Cannot find native-image tool. Quitting..." exit 1 fi -export MANDREL_VERSION="$( ${MANDREL_HOME}/bin/native-image --version | cut -d ' ' -f 2 )" +export MANDREL_VERSION="$( ${MANDREL_HOME}/bin/native-image --version | cut -d ' ' -f 2 | head -n1)" cat >./MANDREL.md <