Skip to content

Commit

Permalink
chore(build): update conventional change log config
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Jun 20, 2016
1 parent 4122167 commit 248145e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
23 changes: 10 additions & 13 deletions build/tasks/prepare-release.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
var gulp = require('gulp');
var runSequence = require('run-sequence');
var paths = require('../paths');
var changelog = require('conventional-changelog');
var fs = require('fs');
var bump = require('gulp-bump');
var args = require('../args');
var conventionalChangelog = require('gulp-conventional-changelog');

gulp.task('changelog', function () {
return gulp.src(paths.doc + '/CHANGELOG.md', {
buffer: false
}).pipe(conventionalChangelog({
preset: 'angular'
}))
.pipe(gulp.dest(paths.doc));
});

gulp.task('bump-version', function(){
return gulp.src(['./package.json', './bower.json'])
.pipe(bump({type:args.bump })) //major|minor|patch|prerelease
.pipe(gulp.dest('./'));
});

gulp.task('changelog', function(callback) {
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));

return changelog({
repository: pkg.repository.url,
version: pkg.version,
file: paths.doc + '/CHANGELOG.md'
}, function(err, log) {
fs.writeFileSync(paths.doc + '/CHANGELOG.md', log);
});
});

gulp.task('prepare-release', function(callback){
return runSequence(
'build',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@
"babel-preset-es2015-loose": "^7.0.0",
"babel-preset-es2015-loose-native-modules": "^1.0.0",
"babel-preset-stage-1": "^6.5.0",
"conventional-changelog": "1.1.0",
"del": "^2.2.0",
"gulp": "^3.9.1",
"gulp-babel": "^6.1.2",
"gulp-bump": "^2.1.0",
"gulp-concat": "^2.6.0",
"gulp-conventional-changelog": "^1.1.0",
"gulp-eslint": "^2.0.0",
"gulp-ignore": "^2.0.1",
"gulp-insert": "^0.5.0",
Expand Down

0 comments on commit 248145e

Please sign in to comment.