Skip to content

Commit

Permalink
fix(first commit): add first commit to changelog
Browse files Browse the repository at this point in the history
First commit is always missing from changelog.
  • Loading branch information
stephanebachelier authored and ajoslin committed Jul 7, 2014
1 parent 37f5561 commit 386cd40
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function generate(options, done) {
}

git.latestTag(function(err, tag) {
if (err || !tag) return done('Failed to read git tags.\n'+err);
if (err || tag === undefined) return done('Failed to read git tags.\n'+err);
getChangelogCommits(tag);
});

Expand Down
3 changes: 2 additions & 1 deletion lib/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ function getFirstCommit(done) {
if (stderr || !String(stdout).trim()) {
done('No commits found!');
} else {
done(null, String(stdout).split('\n')[0].split(' ')[0].trim());
// return empty string for first commit to appear in changelog
done(null, '');
}
});
}
Expand Down

0 comments on commit 386cd40

Please sign in to comment.