Skip to content
This repository has been archived by the owner on Nov 20, 2019. It is now read-only.

Commit

Permalink
fix(cli): fix bug when no publish is needed
Browse files Browse the repository at this point in the history
Signed-off-by: Charlike Mike Reagent <[email protected]>
  • Loading branch information
Charlike Mike Reagent committed Nov 15, 2017
1 parent 3c59e67 commit 4883b77
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
* @license Apache-2.0
*/

/* eslint-disable no-console */

const { prepublish, publish } = require('./index.js')

const cwd = process.cwd()

prepublish(cwd)
.then(({ nextVersion }) => publish(nextVersion))
.then((versions) => (versions ? publish(versions.nextVersion) : true))
.catch((er) => {
/* eslint-disable no-console */
console.error('new-release error!')
console.error(er.stack)

Expand Down

0 comments on commit 4883b77

Please sign in to comment.