diff --git a/scripts/publish.js b/scripts/publish.js index ee108fca46..9078f1f09b 100644 --- a/scripts/publish.js +++ b/scripts/publish.js @@ -42,10 +42,16 @@ async function ensureBuildVersion(packageName, version) { */ function publishBuild(packageName, tag) { let buildDir = path.join(rootDir, "packages", packageName); + let args = ["--access public", `--tag ${tag}`]; + if (tag === "experimental") { + args.push(`--no-git-checks`); + } else { + args.push("--publish-branch release-next"); + } console.log(); console.log(` pnpm publish ${buildDir} --tag ${tag} --access public`); console.log(); - execSync(`pnpm publish ${buildDir} --tag ${tag} --access public`, { + execSync(`pnpm publish ${buildDir} ${args.join(" ")}`, { stdio: "inherit", }); } diff --git a/scripts/version.js b/scripts/version.js index 30497c5c17..89c33ce101 100644 --- a/scripts/version.js +++ b/scripts/version.js @@ -147,7 +147,13 @@ async function run() { }); } - // 7. Commit and tag + // 7. Sync up the pnpm-lock.yaml for pnpm if this is an experimental release + if (isExperimental) { + console.log(chalk.green(" Syncing pnpm lockfile...")); + execSync("pnpm install --no-frozen-lockfile"); + } + + // 8. Commit and tag execSync(`git commit --all --message="Version ${version}"`); execSync(`git tag -a -m "Version ${version}" v${version}`); console.log(chalk.green(` Committed and tagged version ${version}`));