gulp-update-changelog
v1.0.1
Published
A Change-log-update from git log - plugin for gulp
Downloads
4
Readme
Update the Changelog with latest-commit-log from git
Prepare the Environment -- Windows
- Install node.js from HERE
- Install git from HERE
- Run the following command , to install the global grunt:
npm install -g grunt-cli
- Run the following command , to install the gulp change log:
npm install -g gulp-update-changelog
Usage
- add the following scripts to your
gulpfile.js
: - Supply the options for sortlog
var gulp = require('gulp');
var sortlog = require("gulp-update-changelog");
var fs= require('node-fs');
var pkg = JSON.parse(fs.readFileSync("package.json","utf8"));
var today = new Date();
var date = today.getFullYear()+'/'+(today.getMonth()+1)+'/'+today.getDate();
var time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
var dateTime = date+' '+time;
gulp.task("default", function(){
sortlog({
src:"CHANGELOG.md",
format:"git log --pretty=::%s --no-merges",
dateAfter:pkg.CLdate,
tempLogFile:'release-notes/.G-log.md',
dest:"release-notes/.G-CHANGELOG.md",
fileHeader:"# [" + pkg.CLversion+ "] # " + dateTime
});
});