Add upgrade notice for JDK 20 users.

This commit is contained in:
Fabio Niephaus 2023-09-19 14:40:18 +02:00
parent 3282b5e43f
commit 814434c7a9
No known key found for this signature in database
GPG Key ID: F21CF5275F31DFD6
2 changed files with 12 additions and 2 deletions

6
dist/main/index.js generated vendored
View File

@ -70322,9 +70322,13 @@ exports.checkForUpdates = void 0;
const core = __importStar(__nccwpck_require__(2186));
function checkForUpdates(graalVMVersion, javaVersion) {
return __awaiter(this, void 0, void 0, function* () {
if (javaVersion === '20') {
core.notice('A new GraalVM release is available! Please consider upgrading to GraalVM for JDK 21: https://medium.com/p/ee01177dd12d');
return;
}
if (graalVMVersion.length > 0 &&
(javaVersion === '17' || javaVersion === '19')) {
const recommendedJDK = javaVersion === '17' ? '17' : '20';
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`);
return;
}

View File

@ -4,11 +4,17 @@ export async function checkForUpdates(
graalVMVersion: string,
javaVersion: string
): Promise<void> {
if (javaVersion === '20') {
core.notice(
'A new GraalVM release is available! Please consider upgrading to GraalVM for JDK 21: https://medium.com/p/ee01177dd12d'
)
return
}
if (
graalVMVersion.length > 0 &&
(javaVersion === '17' || javaVersion === '19')
) {
const recommendedJDK = javaVersion === '17' ? '17' : '20'
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`
)