Skip to content

Commit f40180b

Browse files
authored
fix(Templates): Fixed Build Fail Due to Templates with Non-Json Artifacts (#5232)
modified downloading to json only, since we only support json right now
1 parent a872051 commit f40180b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

downloadTemplates.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ const downloadTemplate = async (path) => {
2828
const templateManifestRes = await fetch(templateManifestUrl);
2929
const templateManifest = await templateManifestRes.json();
3030
for (const artifact of templateManifest.artifacts) {
31-
await downloadArtifact(`${path}/${artifact.file}`);
31+
if (artifact.file.endsWith('.json')) {
32+
// We only support .json for now
33+
await downloadJsonArtifact(`${path}/${artifact.file}`);
34+
}
3235
}
3336
templateManifest.images = {
3437
light: `${baseURL}/${path}/${templateManifest.images.light}.png`,
@@ -38,7 +41,7 @@ const downloadTemplate = async (path) => {
3841
await fs.writeFile(`${templatesFolder}/${path}/manifest.json`, JSON.stringify(templateManifest, null, 2));
3942
};
4043

41-
const downloadArtifact = async (path) => {
44+
const downloadJsonArtifact = async (path) => {
4245
const artifactUrl = `${baseURL}/${path}`;
4346
// eslint-disable-next-line no-undef
4447
const artifactRes = await fetch(artifactUrl);

0 commit comments

Comments
 (0)