Skip to content

Commit

Permalink
Improve scripts to download release artifacts in parallel [skip ci]
Browse files Browse the repository at this point in the history
Don't show in changelog
  • Loading branch information
4ian committed Nov 30, 2024
1 parent 2052db6 commit a06ef20
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions newIDE/app/scripts/download-all-build-artifacts.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,22 @@ const artifactsToDownload = {
(async () => {
shell.mkdir('-p', outputPath);

for (const key in artifactsToDownload) {
const { url, outputFilename } = artifactsToDownload[key];
await Promise.all(
Object.keys(artifactsToDownload).map(async key => {
const { url, outputFilename } = artifactsToDownload[key];

shell.echo(
`ℹ️ Downloading ${key} artifact (${url}) to ${outputFilename}...`
);
try {
await downloadLocalFile(url, path.join(outputPath, outputFilename));
} catch (error) {
shell.echo(`❌ Error while downloading ${key} artifact. Aborting.`);
shell.exit(2);
}
}
shell.echo(
`ℹ️ Downloading ${key} artifact (${url}) to ${outputFilename}...`
);
try {
await downloadLocalFile(url, path.join(outputPath, outputFilename));
shell.echo(
`ℹ️ Done downloading ${key} artifact (${url}) to ${outputFilename}...`
);
} catch (error) {
shell.echo(`❌ Error while downloading ${key} artifact. Aborting.`);
shell.exit(2);
}
})
);
})();

0 comments on commit a06ef20

Please sign in to comment.