CI: remove unnecessary URL check
This commit is contained in:
parent
67efab0726
commit
8ac4afa11d
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user