diff --git a/coin/provisioning/common/macos/java.sh b/coin/provisioning/common/macos/java.sh index 1429f82410b..829b94c61da 100755 --- a/coin/provisioning/common/macos/java.sh +++ b/coin/provisioning/common/macos/java.sh @@ -1,17 +1,20 @@ #!/usr/bin/env bash -# Copyright (C) 2021 The Qt Company Ltd. +# Copyright (C) 2024 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only # This script installs JDK set -ex +source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh" + echo "Installing Java Development Kit" -version=11.0.12 -targetFile=jdk-${version}_osx-x64_bin.dmg +version=17.0.12 +targetFile=jdk-${version}_macos-x64_bin.dmg +expectedHash="6fba2fbe5d181bd2ef7fd79e0335278c13f611cb" url=ci-files01-hki.ci.qt.io:/hdd/www/input/mac -# url_alt=https://www.oracle.com/java/technologies/downloads/#java11-linux +# url_alt=https://www.oracle.com/java/technologies/downloads/#jdk17-mac echo "Mounting $targetFile" sudo mkdir -p /Volumes/files @@ -19,6 +22,8 @@ sudo mount -o locallocks "$url" /Volumes/files sudo cp "/Volumes/files/$targetFile" /tmp sudo umount /Volumes/files +cd /tmp +VerifyHash "$targetFile" "$expectedHash" sudo hdiutil attach "/tmp/$targetFile" echo Installing JDK