Skip to content

Commit

Permalink
fix(ar-changelog): 修复publish失败
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer17x committed Jul 15, 2022
1 parent 7918fdd commit d57d529
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions packages/scripts/ar-changelog/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ program
});

program.command('publish')
.argument('<tag>', 'The tag to publish to')
.description('Publish a package to npm')
.action(() => {
npmPublish().catch((err) => {
.action((tag) => {
npmPublish(tag).catch((err) => {
console.error(err);
process.exit(1);
});
Expand Down
4 changes: 2 additions & 2 deletions packages/scripts/ar-changelog/src/commands/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { args, getPackageInfo, publishPackage, step, getConfig } from '../utils'

const MAIN_PACKAGE = getConfig().mainPackage;

export async function npmPublish() {
const tag = args._[0];
export async function npmPublish(tag: string) {
step(`Publishing tag: ${tag}`);

if (!tag) {
throw new Error('No tag specified');
Expand Down

0 comments on commit d57d529

Please sign in to comment.