Gulpfile.js
function changes() {
  const version   = require('./package.json').version;
  const changelog = File.readFileSync('CHANGELOG.md', 'utf-8');
  const match     = changelog.match(/^## Version (.*) .*\n([\S\s]+?)\n##/m);

  assert(match, 'CHANGELOG.md missing entry: ## Version ' + version);
  assert.equal(match[1], version, 'CHANGELOG.md missing entry for version ' + version);

  const changes   = match[2].trim();
  assert(changes, 'CHANGELOG.md empty entry for version ' + version);
  File.writeFileSync('.changes', changes);
}
function changes() {
  const version   = require('./package.json').version;
  const changelog = File.readFileSync('CHANGELOG.md', 'utf-8');
  const match     = changelog.match(/^## Version (.*) .*\n([\S\s]+?)\n##/m);

  assert(match, 'CHANGELOG.md missing entry: ## Version ' + version);
  assert.equal(match[1], version, 'CHANGELOG.md missing entry for version ' + version);

  const changes   = match[2].trim();
  assert(changes, 'CHANGELOG.md empty entry for version ' + version);
  File.writeFileSync('.changes', changes);
}
function changes ( ) { const version = require ( './package.json' ) . version ; const changelog = File . readFileSync ( 'CHANGELOG.md' , 'utf-8' ) ; const match = changelog . match ( / ^## Version (.*) .*\n([\S\s]+?)\n## / m ) ; assert ( match , 'CHANGELOG.md missing entry: ## Version ' + version ) ; assert . equal ( match [ 1 ] , version , 'CHANGELOG.md missing entry for version ' + version ) ; const changes = match [ 2 ] . trim ( ) ; assert ( changes , 'CHANGELOG.md empty entry for version ' + version ) ; File . writeFileSync ( '.changes' , changes ) ; }
Generate a change log summary for this release git tag uses the generated .changes file
Generate a change log summary for this release git tag uses the generated . changes file