This commit is contained in:
mkorwel
2025-07-01 10:46:34 -05:00
parent dc83ad6752
commit 5094d5c013
+8 -4
View File
@@ -41,7 +41,8 @@ const newVersion = readJson(rootPackageJsonPath).version;
// 4. Update the sandboxImageUri in the root package.json // 4. Update the sandboxImageUri in the root package.json
const rootPackageJson = readJson(rootPackageJsonPath); const rootPackageJson = readJson(rootPackageJsonPath);
if (rootPackageJson.config?.sandboxImageUri) { if (rootPackageJson.config?.sandboxImageUri) {
rootPackageJson.config.sandboxImageUri = rootPackageJson.config.sandboxImageUri.replace(/:.*$/, `:${newVersion}`); rootPackageJson.config.sandboxImageUri =
rootPackageJson.config.sandboxImageUri.replace(/:.*$/, `:${newVersion}`);
console.log(`Updated sandboxImageUri in root to use version ${newVersion}`); console.log(`Updated sandboxImageUri in root to use version ${newVersion}`);
writeJson(rootPackageJsonPath, rootPackageJson); writeJson(rootPackageJsonPath, rootPackageJson);
} }
@@ -50,9 +51,12 @@ if (rootPackageJson.config?.sandboxImageUri) {
const cliPackageJsonPath = resolve(process.cwd(), 'packages/cli/package.json'); const cliPackageJsonPath = resolve(process.cwd(), 'packages/cli/package.json');
const cliPackageJson = readJson(cliPackageJsonPath); const cliPackageJson = readJson(cliPackageJsonPath);
if (cliPackageJson.config?.sandboxImageUri) { if (cliPackageJson.config?.sandboxImageUri) {
cliPackageJson.config.sandboxImageUri = cliPackageJson.config.sandboxImageUri.replace(/:.*$/, `:${newVersion}`); cliPackageJson.config.sandboxImageUri =
console.log(`Updated sandboxImageUri in cli package to use version ${newVersion}`); cliPackageJson.config.sandboxImageUri.replace(/:.*$/, `:${newVersion}`);
writeJson(cliPackageJsonPath, cliPackageJson); console.log(
`Updated sandboxImageUri in cli package to use version ${newVersion}`,
);
writeJson(cliPackageJsonPath, cliPackageJson);
} }
// 6. Run `npm install` to update package-lock.json. // 6. Run `npm install` to update package-lock.json.