Skip to content

Commit

Permalink
chore: avoid extra request when checking for MUSL builds
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB authored Feb 14, 2024
1 parent 91f6e50 commit b0fe827
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 b0fe827

Please sign in to comment.