summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorShreya Keshive <[email protected]>2025-07-16 15:06:39 -0400
committerGitHub <[email protected]>2025-07-16 19:06:39 +0000
commite4ed1aabac10101a6ad6c25e46e84a3d2091bb88 (patch)
tree93ba1ae92559717f43aea23cfc5b8c2de209ecbc /scripts
parent34c1b5811a01ad184a8c90fee829216193684da0 (diff)
Include companion VS Code extension VSIX as part of build/release (#4254)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build.js4
-rw-r--r--scripts/clean.js8
-rw-r--r--scripts/copy_bundle_assets.js8
3 files changed, 20 insertions, 0 deletions
diff --git a/scripts/build.js b/scripts/build.js
index 2555a750..edf0b3f8 100644
--- a/scripts/build.js
+++ b/scripts/build.js
@@ -33,6 +33,10 @@ if (!existsSync(join(root, 'node_modules'))) {
// build all workspaces/packages
execSync('npm run generate', { stdio: 'inherit', cwd: root });
execSync('npm run build --workspaces', { stdio: 'inherit', cwd: root });
+execSync('npx --yes @vscode/vsce package --no-dependencies', {
+ stdio: 'inherit',
+ cwd: join(root, 'packages', 'vscode-ide-companion'),
+});
// also build container image if sandboxing is enabled
// skip (-s) npm install + build since we did that above
diff --git a/scripts/clean.js b/scripts/clean.js
index d53d097e..833f4842 100644
--- a/scripts/clean.js
+++ b/scripts/clean.js
@@ -45,3 +45,11 @@ for (const workspace of rootPackageJson.workspaces) {
rmSync(join(pkgDir, 'dist'), RMRF_OPTIONS);
}
}
+
+// Clean up vsix files in vscode-ide-companion
+const vsixFiles = globSync('packages/vscode-ide-companion/*.vsix', {
+ cwd: root,
+});
+for (const vsixFile of vsixFiles) {
+ rmSync(join(root, vsixFile), RMRF_OPTIONS);
+}
diff --git a/scripts/copy_bundle_assets.js b/scripts/copy_bundle_assets.js
index 5a3af3e9..79d2a080 100644
--- a/scripts/copy_bundle_assets.js
+++ b/scripts/copy_bundle_assets.js
@@ -37,4 +37,12 @@ for (const file of sbFiles) {
copyFileSync(join(root, file), join(bundleDir, basename(file)));
}
+// Find and copy all .vsix files from packages to the root of the bundle directory
+const vsixFiles = glob.sync('packages/vscode-ide-companion/*.vsix', {
+ cwd: root,
+});
+for (const file of vsixFiles) {
+ copyFileSync(join(root, file), join(bundleDir, basename(file)));
+}
+
console.log('Assets copied to bundle/');