Fix: release script do not update lock file correctly (#6257)

pull/6263/head
Paulus Lucas 4 months ago committed by GitHub
parent 83c3cfc8c0
commit b7bb961eac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -27,7 +27,18 @@ if (! exists) {
// Also update package-lock.json
const npm = /^win/.test(process.platform) ? "npm.cmd" : "npm";
childProcess.spawnSync(npm, [ "install" ]);
const resultVersion = childProcess.spawnSync(npm, [ "--no-git-tag-version", "version", newVersion ], { shell: true });
if (resultVersion.error) {
console.error(resultVersion.error);
console.error("error npm version!");
process.exit(1);
}
const resultInstall = childProcess.spawnSync(npm, [ "install" ], { shell: true });
if (resultInstall.error) {
console.error(resultInstall.error);
console.error("error update package-lock!");
process.exit(1);
}
commit(newVersion);
} else {

Loading…
Cancel
Save