Skip to content

Commit

Permalink
chore: patch fix for private release
Browse files Browse the repository at this point in the history
  • Loading branch information
chaance committed Nov 24, 2021
1 parent 8263ae5 commit fb0bc26
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/publish-private.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const path = require("path");
const { execSync } = require("child_process");
const semver = require("semver");
const jsonfile = require("jsonfile");

const buildDir = path.resolve(__dirname, "../build/node_modules");

Expand Down Expand Up @@ -37,6 +38,10 @@ async function run() {
"react",
"serve"
]) {
// fix for https://github.com/remix-run/remix/actions/runs/1500713248
await updatePackageConfig(name, config => {
config.repository = "https://github.com/remix-run/packages";
});
publish(path.join(buildDir, "@remix-run", name), tag);
}
}
Expand All @@ -50,3 +55,10 @@ run().then(
process.exit(1);
}
);

async function updatePackageConfig(packageName, transform) {
let file = path.join(buildDir, "@remix-run", packageName, "package.json");
let json = await jsonfile.readFile(file);
transform(json);
await jsonfile.writeFile(file, json, { spaces: 2 });
}

0 comments on commit fb0bc26

Please sign in to comment.