From dad2a98413a6f1a47e569a8b138f57f454852bca Mon Sep 17 00:00:00 2001 From: articlecat <38485721+articlecat@users.noreply.github.com> Date: Mon, 19 Oct 2020 05:59:14 -0700 Subject: [PATCH 1/2] Add patch for custom extensions gallery Extend product.ts to accept environment variables for custom extensions gallery URLs --- patches/custom-extensions-gallery.patch | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 patches/custom-extensions-gallery.patch diff --git a/patches/custom-extensions-gallery.patch b/patches/custom-extensions-gallery.patch new file mode 100644 index 0000000..2d4f4ec --- /dev/null +++ b/patches/custom-extensions-gallery.patch @@ -0,0 +1,28 @@ +diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts +index 2bea85740c..d0e9da036c 100644 +--- a/src/vs/platform/product/common/product.ts ++++ b/src/vs/platform/product/common/product.ts +@@ -57,6 +57,23 @@ else { + }); + } + ++ // Set user-defined extension gallery ++ if ( ++ env['VSCODIUM_EXTENSIONS_GALLERY_SERVICE_URL'] ++ || env['VSCODIUM_EXTENSIONS_GALLERY_ITEM_URL'] ++ || env['VSCODIUM_EXTENSIONS_GALLERY_CONTROL_URL'] ++ || env['VSCODIUM_EXTENSIONS_GALLERY_RECOMMENDATIONS_URL'] ++ ) { ++ Object.assign(product, { ++ extensionsGallery: { ++ serviceUrl: env['VSCODIUM_EXTENSIONS_GALLERY_SERVICE_URL'], ++ itemUrl: env['VSCODIUM_EXTENSIONS_GALLERY_ITEM_URL'], ++ controlUrl: env['VSCODIUM_EXTENSIONS_GALLERY_CONTROL_URL'], ++ recommendationsUrl: env['VSCODIUM_EXTENSIONS_GALLERY_RECOMMENDATIONS_URL'] ++ } ++ }) ++ } ++ + Object.assign(product, { + version: pkg.version + }); From 23bd025392290ea100ca57da645f9a9a7b4d1bf6 Mon Sep 17 00:00:00 2001 From: articlecat <38485721+articlecat@users.noreply.github.com> Date: Mon, 19 Oct 2020 06:01:04 -0700 Subject: [PATCH 2/2] Apply custom-extensions-gallery.patch in prepare_vscode.sh --- prepare_vscode.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/prepare_vscode.sh b/prepare_vscode.sh index ae93af4..4a9a82a 100755 --- a/prepare_vscode.sh +++ b/prepare_vscode.sh @@ -13,6 +13,7 @@ cd vscode || exit ../update_settings.sh # apply patches +patch -u src/vs/platform/product/common/product.ts -i ../patches/custom-extensions-gallery.patch patch -u src/vs/platform/update/electron-main/updateService.win32.ts -i ../patches/update-cache-path.patch if [[ "$OS_NAME" == "osx" ]]; then