mirror of
https://github.com/graalvm/setup-graalvm.git
synced 2025-03-04 01:30:10 +08:00
Fix upgrade notice for JDK 20 users.
This commit is contained in:
parent
0a27862568
commit
2fb264a6b0
48
dist/main/index.js
generated
vendored
48
dist/main/index.js
generated
vendored
@ -70308,36 +70308,25 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.checkForUpdates = void 0;
|
exports.checkForUpdates = void 0;
|
||||||
const core = __importStar(__nccwpck_require__(2186));
|
const core = __importStar(__nccwpck_require__(2186));
|
||||||
function checkForUpdates(graalVMVersion, javaVersion) {
|
function checkForUpdates(graalVMVersion, javaVersion) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
if (javaVersion === '20') {
|
||||||
if (javaVersion === '20') {
|
core.notice('A new GraalVM release is available! Please consider upgrading to GraalVM for JDK 21: https://medium.com/graalvm/graalvm-for-jdk-21-is-here-ee01177dd12d');
|
||||||
core.notice('A new GraalVM release is available! Please consider upgrading to GraalVM for JDK 21: https://medium.com/p/ee01177dd12d');
|
return;
|
||||||
return;
|
}
|
||||||
}
|
if (graalVMVersion.length > 0 &&
|
||||||
if (graalVMVersion.length > 0 &&
|
(javaVersion === '17' || javaVersion === '19')) {
|
||||||
(javaVersion === '17' || javaVersion === '19')) {
|
const recommendedJDK = javaVersion === '17' ? '17' : '21';
|
||||||
const recommendedJDK = javaVersion === '17' ? '17' : '21';
|
core.notice(`A new GraalVM release is available! Please consider upgrading to GraalVM for JDK ${recommendedJDK}. Instructions: https://github.com/graalvm/setup-graalvm#migrating-from-graalvm-223-or-earlier-to-the-new-graalvm-for-jdk-17-and-later`);
|
||||||
core.notice(`A new GraalVM release is available! Please consider upgrading to GraalVM for JDK ${recommendedJDK}. Instructions: https://github.com/graalvm/setup-graalvm#migrating-from-graalvm-223-or-earlier-to-the-new-graalvm-for-jdk-17-and-later`);
|
return;
|
||||||
return;
|
}
|
||||||
}
|
if (graalVMVersion.startsWith('22.3.') && javaVersion === '11') {
|
||||||
if (graalVMVersion.startsWith('22.3.') && javaVersion === '11') {
|
core.notice('Please consider upgrading your project to Java 17+. GraalVM 22.3.X releases are the last to support JDK11: https://github.com/oracle/graal/issues/5063');
|
||||||
core.notice('Please consider upgrading your project to Java 17+. GraalVM 22.3.X releases are the last to support JDK11: https://github.com/oracle/graal/issues/5063');
|
return;
|
||||||
return;
|
}
|
||||||
}
|
// TODO: add support for JDK-specific update checks (e.g., 17.0.X)
|
||||||
// TODO: add support for JDK-specific update checks (e.g., 17.0.X)
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
exports.checkForUpdates = checkForUpdates;
|
exports.checkForUpdates = checkForUpdates;
|
||||||
|
|
||||||
@ -71388,6 +71377,11 @@ function run() {
|
|||||||
const isGraalVMforJDK17OrLater = distribution.length > 0 || graalVMVersion.length == 0;
|
const isGraalVMforJDK17OrLater = distribution.length > 0 || graalVMVersion.length == 0;
|
||||||
let graalVMHome;
|
let graalVMHome;
|
||||||
if (isGraalVMforJDK17OrLater) {
|
if (isGraalVMforJDK17OrLater) {
|
||||||
|
if (enableCheckForUpdates &&
|
||||||
|
(distribution === c.DISTRIBUTION_GRAALVM ||
|
||||||
|
distribution === c.DISTRIBUTION_GRAALVM_COMMUNITY)) {
|
||||||
|
(0, check_for_updates_1.checkForUpdates)(graalVMVersion, javaVersion);
|
||||||
|
}
|
||||||
switch (distribution) {
|
switch (distribution) {
|
||||||
case c.DISTRIBUTION_GRAALVM:
|
case c.DISTRIBUTION_GRAALVM:
|
||||||
graalVMHome = yield graalvm.setUpGraalVMJDK(javaVersion);
|
graalVMHome = yield graalvm.setUpGraalVMJDK(javaVersion);
|
||||||
@ -71449,7 +71443,7 @@ function run() {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (enableCheckForUpdates) {
|
if (enableCheckForUpdates) {
|
||||||
yield (0, check_for_updates_1.checkForUpdates)(graalVMVersion, javaVersion);
|
(0, check_for_updates_1.checkForUpdates)(graalVMVersion, javaVersion);
|
||||||
}
|
}
|
||||||
graalVMHome = yield graalvm.setUpGraalVMRelease(gdsToken, graalVMVersion, javaVersion);
|
graalVMHome = yield graalvm.setUpGraalVMRelease(gdsToken, graalVMVersion, javaVersion);
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
|
|
||||||
export async function checkForUpdates(
|
export function checkForUpdates(
|
||||||
graalVMVersion: string,
|
graalVMVersion: string,
|
||||||
javaVersion: string
|
javaVersion: string
|
||||||
): Promise<void> {
|
): void {
|
||||||
if (javaVersion === '20') {
|
if (javaVersion === '20') {
|
||||||
core.notice(
|
core.notice(
|
||||||
'A new GraalVM release is available! Please consider upgrading to GraalVM for JDK 21: https://medium.com/p/ee01177dd12d'
|
'A new GraalVM release is available! Please consider upgrading to GraalVM for JDK 21: https://medium.com/graalvm/graalvm-for-jdk-21-is-here-ee01177dd12d'
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,13 @@ async function run(): Promise<void> {
|
|||||||
distribution.length > 0 || graalVMVersion.length == 0
|
distribution.length > 0 || graalVMVersion.length == 0
|
||||||
let graalVMHome
|
let graalVMHome
|
||||||
if (isGraalVMforJDK17OrLater) {
|
if (isGraalVMforJDK17OrLater) {
|
||||||
|
if (
|
||||||
|
enableCheckForUpdates &&
|
||||||
|
(distribution === c.DISTRIBUTION_GRAALVM ||
|
||||||
|
distribution === c.DISTRIBUTION_GRAALVM_COMMUNITY)
|
||||||
|
) {
|
||||||
|
checkForUpdates(graalVMVersion, javaVersion)
|
||||||
|
}
|
||||||
switch (distribution) {
|
switch (distribution) {
|
||||||
case c.DISTRIBUTION_GRAALVM:
|
case c.DISTRIBUTION_GRAALVM:
|
||||||
graalVMHome = await graalvm.setUpGraalVMJDK(javaVersion)
|
graalVMHome = await graalvm.setUpGraalVMJDK(javaVersion)
|
||||||
@ -117,7 +124,7 @@ async function run(): Promise<void> {
|
|||||||
graalVMHome = await setUpMandrel(graalVMVersion, javaVersion)
|
graalVMHome = await setUpMandrel(graalVMVersion, javaVersion)
|
||||||
} else {
|
} else {
|
||||||
if (enableCheckForUpdates) {
|
if (enableCheckForUpdates) {
|
||||||
await checkForUpdates(graalVMVersion, javaVersion)
|
checkForUpdates(graalVMVersion, javaVersion)
|
||||||
}
|
}
|
||||||
graalVMHome = await graalvm.setUpGraalVMRelease(
|
graalVMHome = await graalvm.setUpGraalVMRelease(
|
||||||
gdsToken,
|
gdsToken,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user