diff options
Diffstat (limited to 'build/lib/builtInExtensions.ts')
-rw-r--r-- | build/lib/builtInExtensions.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/build/lib/builtInExtensions.ts b/build/lib/builtInExtensions.ts index b41477161c9..f5a03d1304e 100644 --- a/build/lib/builtInExtensions.ts +++ b/build/lib/builtInExtensions.ts @@ -69,17 +69,20 @@ function isUpToDate(extension: IExtensionDefinition): boolean { } function syncMarketplaceExtension(extension: IExtensionDefinition): Stream { + const galleryServiceUrl = productjson.extensionsGallery?.serviceUrl; + const source = ansiColors.blue(galleryServiceUrl ? '[marketplace]' : '[github]'); + if (isUpToDate(extension)) { - log(ansiColors.blue('[marketplace]'), `${extension.name}@${extension.version}`, ansiColors.green('✔︎')); + log(source, `${extension.name}@${extension.version}`, ansiColors.green('✔︎')); return es.readArray([]); } rimraf.sync(getExtensionPath(extension)); - return ext.fromMarketplace(extension.name, extension.version, extension.metadata) + return (galleryServiceUrl ? ext.fromMarketplace(galleryServiceUrl, extension) : ext.fromGithub(extension)) .pipe(rename(p => p.dirname = `${extension.name}/${p.dirname}`)) .pipe(vfs.dest('.build/builtInExtensions')) - .on('end', () => log(ansiColors.blue('[marketplace]'), extension.name, ansiColors.green('✔︎'))); + .on('end', () => log(source, extension.name, ansiColors.green('✔︎'))); } function syncExtension(extension: IExtensionDefinition, controlState: 'disabled' | 'marketplace'): Stream { |