mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
build: 发布时不更新tmagic-form runtime的版本号
This commit is contained in:
parent
a1e09c3b54
commit
aec37c35cc
@ -138,14 +138,17 @@ function updateVersions(version) {
|
|||||||
updatePackage(path.resolve(__dirname, '..'), version);
|
updatePackage(path.resolve(__dirname, '..'), version);
|
||||||
// 2. update all packages
|
// 2. update all packages
|
||||||
packages.forEach((p) => updatePackage(getPkgRoot(p), version));
|
packages.forEach((p) => updatePackage(getPkgRoot(p), version));
|
||||||
['vue3', 'react', 'vue2', 'tmagic-form'].forEach((p) => updatePackage(getRunTimeRoot(p), version));
|
['vue3', 'react', 'vue2'].forEach((p) => updatePackage(getRunTimeRoot(p), version));
|
||||||
updatePackage(getPlayground(), version);
|
updatePackage(getPlayground(), version);
|
||||||
|
updatePackage(getRunTimeRoot('tmagic-form'), version, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
function updatePackage(pkgRoot, version) {
|
function updatePackage(pkgRoot, version, updateVersion = true) {
|
||||||
const pkgPath = path.resolve(pkgRoot, 'package.json');
|
const pkgPath = path.resolve(pkgRoot, 'package.json');
|
||||||
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
|
||||||
pkg.version = version;
|
if (updateVersion) {
|
||||||
|
pkg.version = version;
|
||||||
|
}
|
||||||
updateDeps(pkg, 'dependencies', version);
|
updateDeps(pkg, 'dependencies', version);
|
||||||
updateDeps(pkg, 'peerDependencies', version);
|
updateDeps(pkg, 'peerDependencies', version);
|
||||||
fs.writeFileSync(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`);
|
fs.writeFileSync(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user