Skip to content

Commit

Permalink
> Adds changes to output
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Edwards committed Dec 23, 2015
1 parent c444974 commit 3453952
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pliers/build-changelog.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = createTask

var changelog = require('changelog')
// , packageDetails = require('../package.json')
, packageDetails = require('../package.json')

function createTask (pliers) {

Expand All @@ -10,7 +10,7 @@ function createTask (pliers) {
var content = []
, previousVersion = ''

changelog.generate('gulp').then(function (data) {
changelog.generate(packageDetails.name, packageDetails.version).then(function (data) {
data.versions.forEach(function (version) {
var currentVersion = 'v' + version.version
, versions = previousVersion + '...' + currentVersion
Expand All @@ -25,8 +25,12 @@ function createTask (pliers) {
content.push('')
content.push('### Highlights')

data.versions.forEach(function (version) {
content.push('* ' + version.message)
version.changes.forEach(function (change) {
var message = change.message.split('\n')[0]

if (message && message.match(/^[^>v]/gm)) {
content.push('* ' + message)
}
})

content.push('')
Expand Down

0 comments on commit 3453952

Please sign in to comment.