Skip to content

Commit

Permalink
feat(deps): bump conventional-changelog to ^0.2.1 and use new api
Browse files Browse the repository at this point in the history
  • Loading branch information
stevemao committed Jul 24, 2015
1 parent c45dc11 commit 88212f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ module.exports = function(grunt) {
options: {
changelogOpts: {
preset: 'angular',
allBlocks: true
releaseCount: 0
}
},
src: 'test/fixtures/_CHANGELOG.md',
Expand All @@ -91,7 +91,7 @@ module.exports = function(grunt) {
options: {
changelogOpts: {
preset: 'angular',
allBlocks: true
releaseCount: 0
}
},
dest: 'tmp/no-src-all-blocks.md'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"dependencies": {
"chalk": "^1.1.0",
"concat-stream": "^1.5.0",
"conventional-changelog": "^0.1.2",
"conventional-changelog": "^0.2.1",
"plur": "^2.0.0",
"q": "^1.4.1"
},
Expand Down
6 changes: 3 additions & 3 deletions tasks/conventional-changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = function(grunt) {
function generate(src, dest) {
return conventionalChangelog(changelogOpts, context, gitRawCommitsOpts, parserOpts, writerOpts)
.pipe(concat(function(data) {
if (changelogOpts.allBlocks) {
if (changelogOpts.releaseCount === 0) {
grunt.file.write(dest, data);
} else {
var contents = grunt.file.read(src, {
Expand Down Expand Up @@ -60,8 +60,8 @@ module.exports = function(grunt) {
});
}
} else {
if (!changelogOpts.allBlocks) {
grunt.fail.fatal('With `changelogOpts.allBlocks === false` you need to specify a `file.src`');
if (changelogOpts.releaseCount !== 0) {
grunt.fail.fatal('With `changelogOpts.releaseCount !== 0` you need to specify a `file.src`');
}

streams.push(generate(null, file.dest));
Expand Down

0 comments on commit 88212f8

Please sign in to comment.