From 8ac4afa11d43b3095e2db214c1f772f3b7ccecd9 Mon Sep 17 00:00:00 2001 From: Kilian von Pflugk Date: Thu, 15 Aug 2024 23:22:08 +0200 Subject: [PATCH] CI: remove unnecessary URL check --- validate-and-update-manifest.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/validate-and-update-manifest.js b/validate-and-update-manifest.js index 25aca35..39f1a01 100644 --- a/validate-and-update-manifest.js +++ b/validate-and-update-manifest.js @@ -39,12 +39,6 @@ async function updateManifest() { async function validVersion(version) { console.log(`Validating version ${version.version}...`); - const isValidUrl = await checkUrl(version.sourceUrl); - if (!isValidUrl) { - console.error(`Invalid URL: ${version.sourceUrl}`); - process.exit(1); // Exit with an error code - } - const isValidChecksum = await verifyChecksum(version.sourceUrl, version.checksum); if (!isValidChecksum) { console.error(`Checksum mismatch for URL: ${version.sourceUrl}`); @@ -54,16 +48,6 @@ async function validVersion(version) { } } -function checkUrl(url) { - return new Promise((resolve) => { - https.get(url, (res) => { - resolve(res.statusCode === 302); - }).on('error', () => { - resolve(false); - }); - }); -} - async function verifyChecksum(url, expectedChecksum) { try { const hash = await downloadAndHashFile(url);