Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
[ghstack-poisoned]
  • Loading branch information
poteto committed Aug 6, 2024
1 parent 699bd09 commit b0552ff
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions compiler/scripts/release/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,22 +180,17 @@ async function main() {
spinner.start('Pushing tags to npm');
for (const tag of argv.tags) {
try {
let opts;
let opts = ['dist-tag', 'add', `${pkgName}@${newVersion}`, tag];
if (otp != null) {
opts = [
'dist-tag',
'add',
`${pkgName}@${newVersion}`,
tag,
`--otp=${otp}`,
];
} else {
opts = ['dist-tag', 'add', `${pkgName}@${newVersion}`, tag];
opts.push(`--otp=${otp}`);
}
if (argv.debug === true) {
spinner.info(`dry-run: npm ${opts.join(' ')}`);
} else {
await spawnHelper('npm', opts);
await spawnHelper('npm', opts, {
cwd: pkgDir,
stdio: 'inherit',
});
}
} catch (e) {
spinner.fail(e.toString());
Expand Down

0 comments on commit b0552ff

Please sign in to comment.