Skip to content

Commit

Permalink
Merge pull request #2032 from nodejs/SimenB-patch-1
Browse files Browse the repository at this point in the history
chore: avoid extra request when checking for MUSL builds
  • Loading branch information
SimenB authored Feb 15, 2024
2 parents 94fe46e + b0fe827 commit a7c34a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build-automation.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ const checkForMuslVersionsAndSecurityReleases = async (github, versions) => {
const { data: unofficialBuildsIndexText } = await github.request('https://unofficial-builds.nodejs.org/download/release/index.json');

for (let version of Object.keys(versions)) {
const { data: unofficialBuildsWebsiteText } = await github.request(`https://unofficial-builds.nodejs.org/download/release/v${versions[version].fullVersion}`);
const buildVersion = unofficialBuildsIndexText.find(indexVersion => indexVersion.version === `v${versions[version].fullVersion}`);

versions[version].muslBuildExists = unofficialBuildsWebsiteText.includes("musl");
versions[version].isSecurityRelease = unofficialBuildsIndexText.find(indexVersion => indexVersion.version === `v${versions[version].fullVersion}`)?.security;
versions[version].muslBuildExists = buildVersion?.files.includes("linux-x64-musl") ?? false;
versions[version].isSecurityRelease = buildVersion?.security ?? false;
}
return versions;
} catch (error) {
Expand Down

0 comments on commit a7c34a2

Please sign in to comment.