mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
workspace: fix publish script
This commit is contained in:
1 file changed
+3
-2
+3
-2
@@ -53,10 +53,11 @@ if (CI && (!tag || GITHUB_EVENT_NAME !== 'push')) {
|
|||||||
for (const name in bumpMap) {
|
for (const name in bumpMap) {
|
||||||
console.log(`publishing ${name}@${bumpMap[name]} ...`);
|
console.log(`publishing ${name}@${bumpMap[name]} ...`);
|
||||||
if (tag === 'dev') {
|
if (tag === 'dev') {
|
||||||
const pkg = require(`${name}/package.json`);
|
const location = require.resolve(`../${name}/package.json`);
|
||||||
|
const pkg = require(location);
|
||||||
if (!prerelease(pkg.version)) {
|
if (!prerelease(pkg.version)) {
|
||||||
pkg.version += '-dev';
|
pkg.version += '-dev';
|
||||||
writeFileSync(path.resolve(`${name}/package.json`), JSON.stringify(pkg));
|
writeFileSync(location, JSON.stringify(pkg));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await spawnAsync(
|
await spawnAsync(
|
||||||
|
|||||||
Reference in new issue
Block a user