From 9180004c5f95421dcd72a5681d0b46ee46df4b6e Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Tue, 20 Jun 2023 13:04:33 +0200 Subject: [PATCH] Clean up update checks after GraalVM for JDK 17 release. --- dist/main/index.js | 14 +------------- src/features/check-for-updates.ts | 24 +----------------------- 2 files changed, 2 insertions(+), 36 deletions(-) diff --git a/dist/main/index.js b/dist/main/index.js index feb153c..aee5893 100644 --- a/dist/main/index.js +++ b/dist/main/index.js @@ -70167,10 +70167,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge Object.defineProperty(exports, "__esModule", ({ value: true })); exports.checkForUpdates = void 0; 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.length > 0 && @@ -70183,15 +70179,7 @@ function checkForUpdates(graalVMVersion, javaVersion) { 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; } - const latestRelease = yield (0, utils_1.getTaggedRelease)(constants_1.GRAALVM_RELEASES_REPO, 'vm-22.3.1'); - const latestGraalVMVersion = (0, graalvm_1.findGraalVMVersion)(latestRelease); - const selectedVersion = (0, utils_1.toSemVer)(graalVMVersion); - const latestVersion = (0, utils_1.toSemVer)(latestGraalVMVersion); - if ((0, semver_1.valid)(selectedVersion) && - (0, semver_1.valid)(latestVersion) && - (0, semver_1.lt)(selectedVersion, latestVersion)) { - core.notice(`A new GraalVM release is available! Please consider upgrading to GraalVM ${latestGraalVMVersion}. Release notes: https://www.graalvm.org/release-notes/${(0, semver_1.major)(latestVersion)}_${(0, semver_1.minor)(latestVersion)}/`); - } + // TODO: add support for JDK-specific update checks (e.g., 17.0.X) }); } exports.checkForUpdates = checkForUpdates; diff --git a/src/features/check-for-updates.ts b/src/features/check-for-updates.ts index 4f50909..4960bad 100644 --- a/src/features/check-for-updates.ts +++ b/src/features/check-for-updates.ts @@ -1,8 +1,4 @@ import * as core from '@actions/core' -import {getTaggedRelease, toSemVer} from '../utils' -import {lt, major, minor, valid} from 'semver' -import {findGraalVMVersion} from '../graalvm' -import {GRAALVM_RELEASES_REPO} from '../constants' export async function checkForUpdates( graalVMVersion: string, @@ -25,23 +21,5 @@ export async function checkForUpdates( ) return } - - const latestRelease = await getTaggedRelease( - GRAALVM_RELEASES_REPO, - 'vm-22.3.1' - ) - const latestGraalVMVersion = findGraalVMVersion(latestRelease) - const selectedVersion = toSemVer(graalVMVersion) - const latestVersion = toSemVer(latestGraalVMVersion) - if ( - valid(selectedVersion) && - valid(latestVersion) && - lt(selectedVersion, latestVersion) - ) { - core.notice( - `A new GraalVM release is available! Please consider upgrading to GraalVM ${latestGraalVMVersion}. Release notes: https://www.graalvm.org/release-notes/${major( - latestVersion - )}_${minor(latestVersion)}/` - ) - } + // TODO: add support for JDK-specific update checks (e.g., 17.0.X) }