Skip to content

Commit d063f1e

Browse files
djzagergithub-actions[bot]
authored andcommitted
🌱 re-version as 8.0.0 in prebuild (#11)
Signed-off-by: David Zager <david.j.zager@gmail.com>
1 parent 123d38a commit d063f1e

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

scripts/postbuild.js

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,36 @@
33
import fs from "fs";
44
import path from "path";
55
import { fileURLToPath } from "url";
6-
import { extensionName, extensionShortName } from "./prebuild.js";
6+
import { extensionName, extensionShortName, extensionVersion } from "./prebuild.js";
77

88
const __dirname = path.dirname(fileURLToPath(import.meta.url));
99

10+
console.log(`🔍 Running postbuild for ${extensionName}...`);
11+
12+
// First, update all workspace versions
13+
console.log(`📝 Updating all package.json versions to ${extensionVersion}...`);
14+
15+
const workspaces = [
16+
"../package.json",
17+
"../extra-types/package.json",
18+
"../shared/package.json",
19+
"../webview-ui/package.json",
20+
"../agentic/package.json",
21+
"../vscode/package.json",
22+
];
23+
24+
for (const workspacePath of workspaces) {
25+
const fullPath = path.join(__dirname, workspacePath);
26+
if (fs.existsSync(fullPath)) {
27+
const workspacePackage = JSON.parse(fs.readFileSync(fullPath, "utf8"));
28+
workspacePackage.version = extensionVersion;
29+
fs.writeFileSync(fullPath, JSON.stringify(workspacePackage, null, 2));
30+
console.log(` ✅ Updated ${workspacePath}`);
31+
}
32+
}
33+
34+
console.log(`📝 Version updates complete!`);
35+
1036
console.log(`🔍 Running postbuild verification for ${extensionName}...`);
1137

1238
// Read the final package.json to verify branding was applied
@@ -226,7 +252,7 @@ console.log("🔍 Verifying README...");
226252
const readmePath = path.join(__dirname, "../vscode/README.md");
227253
if (fs.existsSync(readmePath)) {
228254
const readmeContent = fs.readFileSync(readmePath, "utf8");
229-
if (readmeContent.includes("Developer Lightspeed for Migration Toolkit for Applications")) {
255+
if (readmeContent.includes("Developer Lightspeed for migration toolkit")) {
230256
console.log(` ✅ README contains proper branding`);
231257
} else {
232258
errors.push("README does not contain proper branding");

scripts/prebuild.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const packageJson = JSON.parse(fs.readFileSync(packagePath, "utf8"));
1515
// Use the package name to determine branding, but override to 'mta' for MTA builds
1616
export const extensionName = "mta-vscode-extension";
1717
export const extensionShortName = "MTA";
18+
export const extensionVersion = "8.0.0";
1819

1920
console.log(`🔄 Running prebuild for ${extensionName}...`);
2021

@@ -185,9 +186,12 @@ Object.assign(packageJson, {
185186
});
186187

187188
// Remove kai binary assets from package (they'll be downloaded at runtime)
188-
if (packageJson.includedAssetPaths?.kai) {
189+
// Keep them for CI/test builds to avoid timing issues
190+
if (packageJson.includedAssetPaths?.kai && !process.env.CI && !process.env.KEEP_KAI_BINARIES) {
189191
delete packageJson.includedAssetPaths.kai;
190192
console.log("✅ Removed kai binary assets from package (runtime download enabled)");
193+
} else if (packageJson.includedAssetPaths?.kai) {
194+
console.log("✅ Keeping kai binary assets for CI/test build");
191195
}
192196

193197
// Transform configuration properties

0 commit comments

Comments
 (0)