Skip to content

Commit

Permalink
Fix experimental releases for pnpm (#9015)
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Mar 8, 2024
1 parent bfdcc66 commit f7ac5e8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-experimental.yml
Expand Up @@ -67,4 +67,4 @@ jobs:
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
- name: 🚀 Publish
run: npm run publish
run: pnpm run publish
8 changes: 7 additions & 1 deletion scripts/publish.js
Expand Up @@ -15,7 +15,13 @@ function getTaggedVersion() {
* @param {string} tag
*/
function publish(dir, tag) {
execSync(`pnpm publish ${dir} --access public --tag ${tag}`, {
let args = ["--access public", `--tag ${tag}`];
if (tag === "experimental") {
args.push(`--no-git-checks`);
} else {
args.push("--publish-branch release-next");
}
execSync(`pnpm publish ${dir} ${args.join(" ")}`, {
stdio: "inherit",
});
}
Expand Down
8 changes: 7 additions & 1 deletion scripts/utils.js
Expand Up @@ -191,14 +191,20 @@ const updateDenoImportMap = async (importMapPath, nextVersion) => {
/**
* @param {string} nextVersion
*/
async function incrementRemixVersion(nextVersion) {
async function incrementRemixVersion(nextVersion, syncLockFile = false) {
// Update version numbers in package.json for all packages
await updateRemixVersion("remix", nextVersion);
await updateRemixVersion("create-remix", nextVersion);
for (let name of remixPackages.all) {
await updateRemixVersion(`remix-${name}`, nextVersion);
}

// Sync up the pnpm-lock.yaml file with the new experimental version
if (syncLockFile) {
console.log(chalk.green(" Syncing pnpm lockfile..."));
execSync("pnpm install --no-frozen-lockfile");
}

// Update version numbers in Deno's import maps
await Promise.all(
[
Expand Down
2 changes: 1 addition & 1 deletion scripts/version.js
Expand Up @@ -42,7 +42,7 @@ async function run(args) {
if (answer === false) return 0;
}

await incrementRemixVersion(nextVersion);
await incrementRemixVersion(nextVersion, givenVersion === "experimental");
}

/**
Expand Down

0 comments on commit f7ac5e8

Please sign in to comment.