From 6455544e839699ee3c8a6eb7add3fd6039c2b1eb Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Tue, 24 Jan 2023 10:35:51 +0100 Subject: [PATCH] Allow `java-version: 'dev'` if `version: 'dev'`. Fixes #30 --- .github/workflows/test.yml | 21 +++++-- README.md | 2 +- dist/cleanup/index.js | 3 +- dist/main/index.js | 79 +++++++++++++++++-------- src/constants.ts | 1 + src/features/check-for-updates.ts | 9 ++- src/graalvm.ts | 96 +++++++++++++++++++++++-------- 7 files changed, 153 insertions(+), 58 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9f0dd45..dc96a94 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ jobs: strategy: matrix: version: [latest, dev] - java-version: ['17', '19'] + java-version: ['19'] components: ['native-image'] os: [macos-latest, windows-latest, ubuntu-latest] include: @@ -42,6 +42,10 @@ jobs: java-version: '17' components: 'native-image' os: windows-2022 + - version: 'dev' + java-version: 'dev' + components: 'native-image' + os: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Run setup-graalvm action @@ -77,10 +81,19 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - version: ['22.3.0', 'latest'] - java-version: ['11', '17', '19'] + version: ['latest'] + java-version: ['19'] components: ['native-image'] os: [macos-latest, windows-latest, ubuntu-latest] + include: + - version: '22.3.0' + java-version: '11' + components: 'native-image' + os: ubuntu-latest + - version: '22.3.0' + java-version: '17' + components: 'native-image' + os: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Run setup-graalvm action @@ -197,7 +210,7 @@ jobs: uses: ./ with: version: 'dev' - java-version: '17' + java-version: 'dev' components: 'espresso,llvm-toolchain,native-image,nodejs,python,R,ruby,wasm' set-java-home: 'false' native-image-job-reports: 'true' diff --git a/README.md b/README.md index d2daaa2..aa17f6b 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ jobs: |-----------------|:--------:|-------------| | `version`
*(required)* | n/a | `X.Y.Z` (e.g., `22.3.0`) for a specific [GraalVM release][releases]
`latest` for [latest stable release][stable],
`dev` for [latest dev build][dev-build],
`mandrel-X.Y.Z` (e.g., `mandrel-21.3.0.0-Final`) for a specific [Mandrel release][mandrel-releases],
`mandrel-latest` for [latest Mandrel stable release][mandrel-stable]. | | `gds-token` | `''` | Download token for the GraalVM Download Service. If a non-empty token is provided, the action will set up GraalVM Enterprise Edition (see [GraalVM EE template](#basic-graalvm-enterprise-edition-template)). | -| `java-version`
*(required)* | n/a | `'17'` or `'19'` for a specific Java version.
(`'8'`, `'11'`, `'16'` are supported for older GraalVM releases.) | +| `java-version`
*(required)* | n/a | `'17'` or `'19'` for a specific Java version, `'dev'` for the highest Java version available (requires `version: 'dev'`).
(`'8'`, `'11'`, `'16'` are supported for older GraalVM releases.) | | `components` | `''` | Comma-spearated list of GraalVM components (e.g., `native-image` or `ruby,nodejs`) that will be installed by the [GraalVM Updater][gu]. | | `github-token` | `''` | Token for communication with the GitHub API. Please set to `${{ secrets.GITHUB_TOKEN }}` (see [templates](#templates)) to allow the action to authenticate with the GitHub API, which helps to reduce rate limiting issues. | | `set-java-home` | `'true'` | If set to `'true'`, instructs the action to set `$JAVA_HOME` to the path of the GraalVM installation. Overrides any previous action or command that sets `$JAVA_HOME`. | diff --git a/dist/cleanup/index.js b/dist/cleanup/index.js index c626d4f..1af1a79 100644 --- a/dist/cleanup/index.js +++ b/dist/cleanup/index.js @@ -73818,7 +73818,7 @@ else { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.EVENT_NAME_PULL_REQUEST = exports.ENV_GITHUB_EVENT_NAME = exports.GDS_GRAALVM_PRODUCT_ID = exports.GDS_BASE = exports.MANDREL_NAMESPACE = exports.JDK_HOME_SUFFIX = exports.GRAALVM_PLATFORM = exports.GRAALVM_GH_USER = exports.GRAALVM_FILE_EXTENSION = exports.GRAALVM_ARCH = exports.VERSION_LATEST = exports.VERSION_DEV = exports.IS_WINDOWS = exports.IS_MACOS = exports.IS_LINUX = exports.INPUT_NI_MUSL = exports.INPUT_CHECK_FOR_UPDATES = exports.INPUT_CACHE = exports.INPUT_SET_JAVA_HOME = exports.INPUT_GITHUB_TOKEN = exports.INPUT_COMPONENTS = exports.INPUT_JAVA_VERSION = exports.INPUT_GDS_TOKEN = exports.INPUT_VERSION = void 0; +exports.EVENT_NAME_PULL_REQUEST = exports.ENV_GITHUB_EVENT_NAME = exports.GDS_GRAALVM_PRODUCT_ID = exports.GDS_BASE = exports.MANDREL_NAMESPACE = exports.JDK_HOME_SUFFIX = exports.GRAALVM_RELEASES_REPO = exports.GRAALVM_PLATFORM = exports.GRAALVM_GH_USER = exports.GRAALVM_FILE_EXTENSION = exports.GRAALVM_ARCH = exports.VERSION_LATEST = exports.VERSION_DEV = exports.IS_WINDOWS = exports.IS_MACOS = exports.IS_LINUX = exports.INPUT_NI_MUSL = exports.INPUT_CHECK_FOR_UPDATES = exports.INPUT_CACHE = exports.INPUT_SET_JAVA_HOME = exports.INPUT_GITHUB_TOKEN = exports.INPUT_COMPONENTS = exports.INPUT_JAVA_VERSION = exports.INPUT_GDS_TOKEN = exports.INPUT_VERSION = void 0; exports.INPUT_VERSION = 'version'; exports.INPUT_GDS_TOKEN = 'gds-token'; exports.INPUT_JAVA_VERSION = 'java-version'; @@ -73837,6 +73837,7 @@ exports.GRAALVM_ARCH = determineGraalVMArchitecture(); exports.GRAALVM_FILE_EXTENSION = exports.IS_WINDOWS ? '.zip' : '.tar.gz'; exports.GRAALVM_GH_USER = 'graalvm'; exports.GRAALVM_PLATFORM = exports.IS_WINDOWS ? 'windows' : process.platform; +exports.GRAALVM_RELEASES_REPO = 'graalvm-ce-builds'; exports.JDK_HOME_SUFFIX = exports.IS_MACOS ? '/Contents/Home' : ''; exports.MANDREL_NAMESPACE = 'mandrel-'; exports.GDS_BASE = 'https://gds.oracle.com/api/20220101'; diff --git a/dist/main/index.js b/dist/main/index.js index 5617f64..754d3ba 100644 --- a/dist/main/index.js +++ b/dist/main/index.js @@ -73707,7 +73707,7 @@ try { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.EVENT_NAME_PULL_REQUEST = exports.ENV_GITHUB_EVENT_NAME = exports.GDS_GRAALVM_PRODUCT_ID = exports.GDS_BASE = exports.MANDREL_NAMESPACE = exports.JDK_HOME_SUFFIX = exports.GRAALVM_PLATFORM = exports.GRAALVM_GH_USER = exports.GRAALVM_FILE_EXTENSION = exports.GRAALVM_ARCH = exports.VERSION_LATEST = exports.VERSION_DEV = exports.IS_WINDOWS = exports.IS_MACOS = exports.IS_LINUX = exports.INPUT_NI_MUSL = exports.INPUT_CHECK_FOR_UPDATES = exports.INPUT_CACHE = exports.INPUT_SET_JAVA_HOME = exports.INPUT_GITHUB_TOKEN = exports.INPUT_COMPONENTS = exports.INPUT_JAVA_VERSION = exports.INPUT_GDS_TOKEN = exports.INPUT_VERSION = void 0; +exports.EVENT_NAME_PULL_REQUEST = exports.ENV_GITHUB_EVENT_NAME = exports.GDS_GRAALVM_PRODUCT_ID = exports.GDS_BASE = exports.MANDREL_NAMESPACE = exports.JDK_HOME_SUFFIX = exports.GRAALVM_RELEASES_REPO = exports.GRAALVM_PLATFORM = exports.GRAALVM_GH_USER = exports.GRAALVM_FILE_EXTENSION = exports.GRAALVM_ARCH = exports.VERSION_LATEST = exports.VERSION_DEV = exports.IS_WINDOWS = exports.IS_MACOS = exports.IS_LINUX = exports.INPUT_NI_MUSL = exports.INPUT_CHECK_FOR_UPDATES = exports.INPUT_CACHE = exports.INPUT_SET_JAVA_HOME = exports.INPUT_GITHUB_TOKEN = exports.INPUT_COMPONENTS = exports.INPUT_JAVA_VERSION = exports.INPUT_GDS_TOKEN = exports.INPUT_VERSION = void 0; exports.INPUT_VERSION = 'version'; exports.INPUT_GDS_TOKEN = 'gds-token'; exports.INPUT_JAVA_VERSION = 'java-version'; @@ -73726,6 +73726,7 @@ exports.GRAALVM_ARCH = determineGraalVMArchitecture(); exports.GRAALVM_FILE_EXTENSION = exports.IS_WINDOWS ? '.zip' : '.tar.gz'; exports.GRAALVM_GH_USER = 'graalvm'; exports.GRAALVM_PLATFORM = exports.IS_WINDOWS ? 'windows' : process.platform; +exports.GRAALVM_RELEASES_REPO = 'graalvm-ce-builds'; exports.JDK_HOME_SUFFIX = exports.IS_MACOS ? '/Contents/Home' : ''; exports.MANDREL_NAMESPACE = 'mandrel-'; exports.GDS_BASE = 'https://gds.oracle.com/api/20220101'; @@ -74081,13 +74082,15 @@ const core = __importStar(__nccwpck_require__(2186)); const utils_1 = __nccwpck_require__(1314); const semver_1 = __nccwpck_require__(1383); const graalvm_1 = __nccwpck_require__(5254); +const constants_1 = __nccwpck_require__(9042); function checkForUpdates(graalVMVersion, javaVersion) { return __awaiter(this, void 0, void 0, function* () { if (graalVMVersion === '22.3.0' && javaVersion === '11') { core.notice('Please consider upgrading your project to Java 17+. The GraalVM 22.3.0 release is the last to support JDK11: https://github.com/oracle/graal/issues/5063'); return; } - const latestGraalVMVersion = yield graalvm_1.getLatestReleaseVersion(); + const latestRelease = yield utils_1.getLatestRelease(constants_1.GRAALVM_RELEASES_REPO); + const latestGraalVMVersion = graalvm_1.findGraalVMVersion(latestRelease); const selectedVersion = utils_1.toSemVer(graalVMVersion); const latestVersion = utils_1.toSemVer(latestGraalVMVersion); if (semver_1.valid(selectedVersion) && @@ -74697,50 +74700,48 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.setUpGraalVMRelease = exports.setUpGraalVMDevBuild = exports.getLatestReleaseVersion = exports.setUpGraalVMLatest = void 0; +exports.setUpGraalVMRelease = exports.setUpGraalVMDevBuild = exports.findGraalVMVersion = exports.setUpGraalVMLatest = void 0; const c = __importStar(__nccwpck_require__(9042)); const utils_1 = __nccwpck_require__(1314); const gds_1 = __nccwpck_require__(9543); const tool_cache_1 = __nccwpck_require__(7784); -const GRAALVM_CE_DL_BASE = 'https://github.com/graalvm/graalvm-ce-builds/releases/download'; +const GRAALVM_CE_DL_BASE = `https://github.com/graalvm/${c.GRAALVM_RELEASES_REPO}/releases/download`; const GRAALVM_REPO_DEV_BUILDS = 'graalvm-ce-dev-builds'; -const GRAALVM_REPO_RELEASES = 'graalvm-ce-builds'; const GRAALVM_TAG_PREFIX = 'vm-'; function setUpGraalVMLatest(gdsToken, javaVersion) { return __awaiter(this, void 0, void 0, function* () { if (gdsToken.length > 0) { return setUpGraalVMRelease(gdsToken, c.VERSION_LATEST, javaVersion); } - const latestReleaseVersion = yield getLatestReleaseVersion(); - return setUpGraalVMRelease(gdsToken, latestReleaseVersion, javaVersion); + const latestRelease = yield utils_1.getLatestRelease(c.GRAALVM_RELEASES_REPO); + const version = findGraalVMVersion(latestRelease); + return setUpGraalVMRelease(gdsToken, version, javaVersion); }); } exports.setUpGraalVMLatest = setUpGraalVMLatest; -function getLatestReleaseVersion() { - return __awaiter(this, void 0, void 0, function* () { - const latestRelease = yield utils_1.getLatestRelease(GRAALVM_REPO_RELEASES); - const tag_name = latestRelease.tag_name; - if (tag_name.startsWith(GRAALVM_TAG_PREFIX)) { - return tag_name.substring(GRAALVM_TAG_PREFIX.length, tag_name.length); - } +function findGraalVMVersion(release) { + const tag_name = release.tag_name; + if (!tag_name.startsWith(GRAALVM_TAG_PREFIX)) { throw new Error(`Could not find latest GraalVM release: ${tag_name}`); - }); + } + return tag_name.substring(GRAALVM_TAG_PREFIX.length, tag_name.length); } -exports.getLatestReleaseVersion = getLatestReleaseVersion; +exports.findGraalVMVersion = findGraalVMVersion; function setUpGraalVMDevBuild(gdsToken, javaVersion) { return __awaiter(this, void 0, void 0, function* () { if (gdsToken.length > 0) { throw new Error('Downloading GraalVM EE dev builds is not supported'); } const latestDevBuild = yield utils_1.getLatestRelease(GRAALVM_REPO_DEV_BUILDS); - const graalVMIdentifier = determineGraalVMIdentifier(false, 'dev', javaVersion); - const expectedFileName = `${graalVMIdentifier}${c.GRAALVM_FILE_EXTENSION}`; - for (const asset of latestDevBuild.assets) { - if (asset.name === expectedFileName) { - return utils_1.downloadAndExtractJDK(asset.browser_download_url); - } + let resolvedJavaVersion; + if (javaVersion == c.VERSION_DEV) { + resolvedJavaVersion = findLatestJavaVersion(latestDevBuild, c.VERSION_DEV); } - throw new Error(`Could not find GraalVM dev build for Java ${javaVersion}. It may no longer be available, so please consider upgrading the Java version. If you think this is a mistake, please file an issue at: https://github.com/graalvm/setup-graalvm/issues.`); + else { + resolvedJavaVersion = javaVersion; + } + const downloadUrl = findDownloadUrl(latestDevBuild, resolvedJavaVersion); + return utils_1.downloadAndExtractJDK(downloadUrl); }); } exports.setUpGraalVMDevBuild = setUpGraalVMDevBuild; @@ -74759,6 +74760,36 @@ function setUpGraalVMRelease(gdsToken, version, javaVersion) { }); } exports.setUpGraalVMRelease = setUpGraalVMRelease; +function findLatestJavaVersion(release, version) { + const graalVMIdentifierPattern = determineGraalVMIdentifier(false, version, '(\\d+)'); + const expectedFileNameRegExp = new RegExp(`^${graalVMIdentifierPattern}${c.GRAALVM_FILE_EXTENSION.replace('.', '\\')}$`); + let highestJavaVersion = 0; + for (const asset of release.assets) { + const matches = asset.name.match(expectedFileNameRegExp); + if (matches) { + const javaVersion = +matches[1]; + if (javaVersion > highestJavaVersion) { + highestJavaVersion = javaVersion; + } + } + } + if (highestJavaVersion > 0) { + return String(highestJavaVersion); + } + else { + throw new Error('Could not find latest Java version. Please file an issue at: https://github.com/graalvm/setup-graalvm/issues.'); + } +} +function findDownloadUrl(release, javaVersion) { + const graalVMIdentifier = determineGraalVMIdentifier(false, c.VERSION_DEV, javaVersion); + const expectedFileName = `${graalVMIdentifier}${c.GRAALVM_FILE_EXTENSION}`; + for (const asset of release.assets) { + if (asset.name === expectedFileName) { + return asset.browser_download_url; + } + } + throw new Error(`Could not find GraalVM dev build for Java ${javaVersion}. It may no longer be available, so please consider upgrading the Java version. If you think this is a mistake, please file an issue at: https://github.com/graalvm/setup-graalvm/issues.`); +} function determineGraalVMIdentifier(isEE, version, javaVersion) { return `graalvm-${isEE ? 'ee' : 'ce'}-java${javaVersion}-${c.GRAALVM_PLATFORM}-${c.GRAALVM_ARCH}-${version}`; } @@ -74775,7 +74806,7 @@ function downloadGraalVMCE(version, javaVersion) { catch (error) { if (error instanceof Error && error.message.includes('404')) { // Not Found - throw new Error(`Failed to download ${graalVMIdentifier}. Are you sure version: '${version}' and javaVersion: '${javaVersion}' are correct?`); + throw new Error(`Failed to download ${graalVMIdentifier}. Are you sure version: '${version}' and java-version: '${javaVersion}' are correct?`); } throw new Error(`Failed to download ${graalVMIdentifier} (error: ${error}).`); } diff --git a/src/constants.ts b/src/constants.ts index 1ff4b3f..e757795 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -21,6 +21,7 @@ export const GRAALVM_ARCH = determineGraalVMArchitecture() export const GRAALVM_FILE_EXTENSION = IS_WINDOWS ? '.zip' : '.tar.gz' export const GRAALVM_GH_USER = 'graalvm' export const GRAALVM_PLATFORM = IS_WINDOWS ? 'windows' : process.platform +export const GRAALVM_RELEASES_REPO = 'graalvm-ce-builds' export const JDK_HOME_SUFFIX = IS_MACOS ? '/Contents/Home' : '' export const MANDREL_NAMESPACE = 'mandrel-' diff --git a/src/features/check-for-updates.ts b/src/features/check-for-updates.ts index 31b7c2f..375b2c4 100644 --- a/src/features/check-for-updates.ts +++ b/src/features/check-for-updates.ts @@ -1,7 +1,8 @@ import * as core from '@actions/core' -import {toSemVer} from '../utils' +import {getLatestRelease, toSemVer} from '../utils' import {lt, major, minor, valid} from 'semver' -import {getLatestReleaseVersion} from '../graalvm' +import {findGraalVMVersion} from '../graalvm' +import {GRAALVM_RELEASES_REPO} from '../constants' export async function checkForUpdates( graalVMVersion: string, @@ -13,7 +14,9 @@ export async function checkForUpdates( ) return } - const latestGraalVMVersion = await getLatestReleaseVersion() + + const latestRelease = await getLatestRelease(GRAALVM_RELEASES_REPO) + const latestGraalVMVersion = findGraalVMVersion(latestRelease) const selectedVersion = toSemVer(graalVMVersion) const latestVersion = toSemVer(latestGraalVMVersion) if ( diff --git a/src/graalvm.ts b/src/graalvm.ts index 872f596..e39c1a0 100644 --- a/src/graalvm.ts +++ b/src/graalvm.ts @@ -7,10 +7,8 @@ import { import {downloadGraalVMEE} from './gds' import {downloadTool} from '@actions/tool-cache' -const GRAALVM_CE_DL_BASE = - 'https://github.com/graalvm/graalvm-ce-builds/releases/download' +const GRAALVM_CE_DL_BASE = `https://github.com/graalvm/${c.GRAALVM_RELEASES_REPO}/releases/download` const GRAALVM_REPO_DEV_BUILDS = 'graalvm-ce-dev-builds' -const GRAALVM_REPO_RELEASES = 'graalvm-ce-builds' const GRAALVM_TAG_PREFIX = 'vm-' export async function setUpGraalVMLatest( @@ -20,17 +18,17 @@ export async function setUpGraalVMLatest( if (gdsToken.length > 0) { return setUpGraalVMRelease(gdsToken, c.VERSION_LATEST, javaVersion) } - const latestReleaseVersion = await getLatestReleaseVersion() - return setUpGraalVMRelease(gdsToken, latestReleaseVersion, javaVersion) + const latestRelease = await getLatestRelease(c.GRAALVM_RELEASES_REPO) + const version = findGraalVMVersion(latestRelease) + return setUpGraalVMRelease(gdsToken, version, javaVersion) } -export async function getLatestReleaseVersion(): Promise { - const latestRelease = await getLatestRelease(GRAALVM_REPO_RELEASES) - const tag_name = latestRelease.tag_name - if (tag_name.startsWith(GRAALVM_TAG_PREFIX)) { - return tag_name.substring(GRAALVM_TAG_PREFIX.length, tag_name.length) +export function findGraalVMVersion(release: c.LatestReleaseResponse['data']) { + const tag_name = release.tag_name + if (!tag_name.startsWith(GRAALVM_TAG_PREFIX)) { + throw new Error(`Could not find latest GraalVM release: ${tag_name}`) } - throw new Error(`Could not find latest GraalVM release: ${tag_name}`) + return tag_name.substring(GRAALVM_TAG_PREFIX.length, tag_name.length) } export async function setUpGraalVMDevBuild( @@ -41,20 +39,14 @@ export async function setUpGraalVMDevBuild( throw new Error('Downloading GraalVM EE dev builds is not supported') } const latestDevBuild = await getLatestRelease(GRAALVM_REPO_DEV_BUILDS) - const graalVMIdentifier = determineGraalVMIdentifier( - false, - 'dev', - javaVersion - ) - const expectedFileName = `${graalVMIdentifier}${c.GRAALVM_FILE_EXTENSION}` - for (const asset of latestDevBuild.assets) { - if (asset.name === expectedFileName) { - return downloadAndExtractJDK(asset.browser_download_url) - } + let resolvedJavaVersion + if (javaVersion == c.VERSION_DEV) { + resolvedJavaVersion = findLatestJavaVersion(latestDevBuild, c.VERSION_DEV) + } else { + resolvedJavaVersion = javaVersion } - throw new Error( - `Could not find GraalVM dev build for Java ${javaVersion}. It may no longer be available, so please consider upgrading the Java version. If you think this is a mistake, please file an issue at: https://github.com/graalvm/setup-graalvm/issues.` - ) + const downloadUrl = findDownloadUrl(latestDevBuild, resolvedJavaVersion) + return downloadAndExtractJDK(downloadUrl) } export async function setUpGraalVMRelease( @@ -73,6 +65,60 @@ export async function setUpGraalVMRelease( return downloadExtractAndCacheJDK(downloader, toolName, version) } +function findLatestJavaVersion( + release: c.LatestReleaseResponse['data'], + version: string +): string { + const graalVMIdentifierPattern = determineGraalVMIdentifier( + false, + version, + '(\\d+)' + ) + const expectedFileNameRegExp = new RegExp( + `^${graalVMIdentifierPattern}${c.GRAALVM_FILE_EXTENSION.replace( + '.', + '\\' + )}$` + ) + let highestJavaVersion = 0 + for (const asset of release.assets) { + const matches = asset.name.match(expectedFileNameRegExp) + if (matches) { + const javaVersion = +matches[1] + if (javaVersion > highestJavaVersion) { + highestJavaVersion = javaVersion + } + } + } + if (highestJavaVersion > 0) { + return String(highestJavaVersion) + } else { + throw new Error( + 'Could not find latest Java version. Please file an issue at: https://github.com/graalvm/setup-graalvm/issues.' + ) + } +} + +function findDownloadUrl( + release: c.LatestReleaseResponse['data'], + javaVersion: string +): string { + const graalVMIdentifier = determineGraalVMIdentifier( + false, + c.VERSION_DEV, + javaVersion + ) + const expectedFileName = `${graalVMIdentifier}${c.GRAALVM_FILE_EXTENSION}` + for (const asset of release.assets) { + if (asset.name === expectedFileName) { + return asset.browser_download_url + } + } + throw new Error( + `Could not find GraalVM dev build for Java ${javaVersion}. It may no longer be available, so please consider upgrading the Java version. If you think this is a mistake, please file an issue at: https://github.com/graalvm/setup-graalvm/issues.` + ) +} + function determineGraalVMIdentifier( isEE: boolean, version: string, @@ -105,7 +151,7 @@ async function downloadGraalVMCE( if (error instanceof Error && error.message.includes('404')) { // Not Found throw new Error( - `Failed to download ${graalVMIdentifier}. Are you sure version: '${version}' and javaVersion: '${javaVersion}' are correct?` + `Failed to download ${graalVMIdentifier}. Are you sure version: '${version}' and java-version: '${javaVersion}' are correct?` ) } throw new Error(