From 4883b772f690000dd5aaa5359c366be88c510606 Mon Sep 17 00:00:00 2001 From: Charlike Mike Reagent Date: Wed, 15 Nov 2017 17:13:12 +0200 Subject: [PATCH] fix(cli): fix bug when no publish is needed Signed-off-by: Charlike Mike Reagent --- src/cli.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cli.js b/src/cli.js index 5ec9f56..185bb84 100755 --- a/src/cli.js +++ b/src/cli.js @@ -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)