[Ubuntu] Add Java 21 (#8560)

This commit is contained in:
Vasilii Polikarpov
2023-10-18 09:51:22 +02:00
committed by GitHub
parent f2d892281b
commit 0253f21ea5
4 changed files with 8 additions and 3 deletions

View File

@@ -53,7 +53,12 @@ installOpenJDK() {
# https://github.com/adoptium/temurin-build/issues/2248
[[ ${fullJavaVersion} =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+ ]] && fullJavaVersion=$(echo $fullJavaVersion | sed -E 's/\.[0-9]+-/-/')
# When version string is too short, add extra ".0" to make it valid semver
[[ ${fullJavaVersion} =~ ^[0-9]+- ]] && fullJavaVersion=$(echo $fullJavaVersion | sed -E 's/-/.0-/')
[[ ${fullJavaVersion} =~ ^[0-9]+\.[0-9]+- ]] && fullJavaVersion=$(echo $fullJavaVersion | sed -E 's/-/.0-/')
javaToolcacheVersionPath="${JAVA_TOOLCACHE_PATH}/${fullJavaVersion}"
echo "Java ${JAVA_VERSION} Toolcache Version Path: ${javaToolcacheVersionPath}"
mkdir -p "${javaToolcacheVersionPath}"
# Create a complete file