CI: remove unnecessary URL check

This commit is contained in:
Kilian von Pflugk 2024-08-15 23:22:08 +02:00
parent 67efab0726
commit 8ac4afa11d

View File

@ -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);