Skip to content

Commit

Permalink
[ci] Fix dist-tag command
Browse files Browse the repository at this point in the history
ghstack-source-id: bdbcc12b2815d00d790397c6a6702c7f6e1564e0
Pull Request resolved: #30619
  • Loading branch information
poteto committed Aug 6, 2024
1 parent 9f0508f commit 030d83b
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 030d83b

Please sign in to comment.