Skip to content

Commit

Permalink
Update publish.js
Browse files Browse the repository at this point in the history
  • Loading branch information
samchon committed Dec 18, 2024
1 parent 3a03a1f commit d6d4411
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions deploy/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ const setup = ({ tag, name, directory, version }) => {
fs.writeFileSync(file, JSON.stringify(info, null, 2), "utf8");
if (fs.existsSync(`${directory}/package-lock.json`))
fs.rmSync(`${directory}/package-lock.json`);
execute({
cwd: directory,
script: `npm publish --tag ${tag} --access public${tag === "latest" ? " --provenance" : ""}`,
studio: "inherit",
});
try {
execute({
cwd: directory,
script: `npm publish --tag ${tag} --access public${tag === "latest" ? " --provenance" : ""}`,
studio: "ignore",
});
} catch {}

// ROLLBACK THE PACKAGE.JSON
for (const r of rollbacks) r();
Expand Down

0 comments on commit d6d4411

Please sign in to comment.