workspace: fix publish script

This commit is contained in:
undefined committed 2025-03-13 04:41:52 +08:00
1 parent 39dd47aa0f
commit af64125393
1 file changed
+3 -2
+3 -2
View File
@@ -53,10 +53,11 @@ if (CI && (!tag || GITHUB_EVENT_NAME !== 'push')) {
for (const name in bumpMap) {
console.log(`publishing ${name}@${bumpMap[name]} ...`);
if (tag === 'dev') {
const pkg = require(`${name}/package.json`);
const location = require.resolve(`../${name}/package.json`);
const pkg = require(location);
if (!prerelease(pkg.version)) {
pkg.version += '-dev';
writeFileSync(path.resolve(`${name}/package.json`), JSON.stringify(pkg));
writeFileSync(location, JSON.stringify(pkg));
}
}
await spawnAsync(