Skip to content

Commit

Permalink
Fix experimental releases to work with pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Mar 26, 2024
1 parent 1058a37 commit f2d6ff5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion scripts/publish.js
Expand Up @@ -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",
});
}
Expand Down
8 changes: 7 additions & 1 deletion scripts/version.js
Expand Up @@ -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}`));
Expand Down

0 comments on commit f2d6ff5

Please sign in to comment.