Skip to content

Commit f2d6ff5

Browse files
committed
Fix experimental releases to work with pnpm
1 parent 1058a37 commit f2d6ff5

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

scripts/publish.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,16 @@ async function ensureBuildVersion(packageName, version) {
4242
*/
4343
function publishBuild(packageName, tag) {
4444
let buildDir = path.join(rootDir, "packages", packageName);
45+
let args = ["--access public", `--tag ${tag}`];
46+
if (tag === "experimental") {
47+
args.push(`--no-git-checks`);
48+
} else {
49+
args.push("--publish-branch release-next");
50+
}
4551
console.log();
4652
console.log(` pnpm publish ${buildDir} --tag ${tag} --access public`);
4753
console.log();
48-
execSync(`pnpm publish ${buildDir} --tag ${tag} --access public`, {
54+
execSync(`pnpm publish ${buildDir} ${args.join(" ")}`, {
4955
stdio: "inherit",
5056
});
5157
}

scripts/version.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,13 @@ async function run() {
147147
});
148148
}
149149

150-
// 7. Commit and tag
150+
// 7. Sync up the pnpm-lock.yaml for pnpm if this is an experimental release
151+
if (isExperimental) {
152+
console.log(chalk.green(" Syncing pnpm lockfile..."));
153+
execSync("pnpm install --no-frozen-lockfile");
154+
}
155+
156+
// 8. Commit and tag
151157
execSync(`git commit --all --message="Version ${version}"`);
152158
execSync(`git tag -a -m "Version ${version}" v${version}`);
153159
console.log(chalk.green(` Committed and tagged version ${version}`));

0 commit comments

Comments
 (0)