From d8e73a6f6bf63dd998754c818b6dd7b4796d1a06 Mon Sep 17 00:00:00 2001 From: Steve Mao Date: Sat, 15 Aug 2015 23:13:37 +1000 Subject: [PATCH 1/2] chore(build): update grunt-conventional-changelog The old grunt-conventional-changelog is buggy and no features. --- Gruntfile.js | 10 ++++++++++ package.json | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 867415b..3580457 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -17,6 +17,16 @@ module.exports = function (grunt) { files: ['src/*.js', 'spec/*Spec.js'], tasks: ['jasmine_node'] } + }, + conventionalChangelog: { + options: { + changelogOpts: { + preset: 'angular' + } + }, + release: { + src: 'CHANGELOG.md' + } } }); diff --git a/package.json b/package.json index 7436511..673e558 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ }, "devDependencies": { "grunt": "~0.4.1", - "grunt-conventional-changelog": "~0.1.0", + "grunt-conventional-changelog": "~4.1.0", "grunt-contrib-watch": "~0.5.0", "grunt-jasmine-node": "~0.1.0", "jasmine-node": "~1.12.0" From 9ef2dc8eef8f82efd9f391a167d968423bc68332 Mon Sep 17 00:00:00 2001 From: Steve Mao Date: Sat, 15 Aug 2015 23:13:19 +1000 Subject: [PATCH 2/2] feat(build): use grunt-conventional-github-releaser You need to setup environment variable GH_TOKEN as your GitHub token. --- Gruntfile.js | 13 +++++++++++++ package.json | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 3580457..4bf32ca 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -27,6 +27,19 @@ module.exports = function (grunt) { release: { src: 'CHANGELOG.md' } + }, + conventionalGithubReleaser: { + release: { + options: { + auth: { + type: 'oauth', + token: process.env.GH_TOKEN + }, + changelogOpts: { + preset: 'angular' + } + } + } } }); diff --git a/package.json b/package.json index 673e558..ba87e79 100644 --- a/package.json +++ b/package.json @@ -25,8 +25,9 @@ }, "devDependencies": { "grunt": "~0.4.1", - "grunt-conventional-changelog": "~4.1.0", "grunt-contrib-watch": "~0.5.0", + "grunt-conventional-changelog": "~4.1.0", + "grunt-conventional-github-releaser": "^0.4.0", "grunt-jasmine-node": "~0.1.0", "jasmine-node": "~1.12.0" }