Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur-kushwaha committed May 17, 2018
2 parents d4dd7d1 + 030e2e8 commit 69573c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = function standardVersion (argv) {

return Promise.resolve()
.then(()=>{
return analyzeCommits();
return args.skipAnalyze||analyzeCommits();
})
.then(() => {
return bump(args, pkg)
Expand Down
7 changes: 5 additions & 2 deletions lib/lifecycles/analyzeCommits.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module.exports = function () {
}).then(commits => {
return Promise.all(commits.map(check))
}).then(tasks => {
var hasErrors=false;
for(var task of tasks){
console.log(chalk.blue(task.commit));
for(var i in task.report.errors){
Expand All @@ -34,9 +35,11 @@ module.exports = function () {
console.log(chalk.yellow('Warning '+(+i+1)+'.',task.report.warnings[i].message));
}
console.log(chalk.black('------------------------'));
if(task.report.errors.length){
hasErrors=true;
}
}

if(task.report.errors.length){
if(hasErrors){
return Promise.reject({
message:"ERRORS: Invalid commits"
});
Expand Down

0 comments on commit 69573c7

Please sign in to comment.