From 564241cd387f56f4d931fc26c0b69fe59906d75c Mon Sep 17 00:00:00 2001 From: Cole Gleason Date: Thu, 16 Jan 2014 02:10:00 -0600 Subject: [PATCH] chore(changelog): add git-changelog config and sample CHANGELOG.md This is the setup for the Grunt task that generates a changelog. Note that it currently generates the changelog for the range changelog-start..HEAD where changelog-start is a tag. It will always use the most recent tag it can find. We may want to change this behavior. Also, the original repo has some bugs, so I'm using my fork until he accepts my PRs. Migration notes: To run: `grunt git_changelog` --- CHANGELOG.md | 7 +++++++ EXTENDEDCHANGELOG.md | 11 +++++++++++ Gruntfile.js | 19 +++++++++++++++++++ package.json | 3 ++- 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG.md create mode 100644 EXTENDEDCHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000000..8da5993552 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +HabitRPG +# (2014-01-16) + + +## Breaking Changes + + diff --git a/EXTENDEDCHANGELOG.md b/EXTENDEDCHANGELOG.md new file mode 100644 index 0000000000..88cc4a2553 --- /dev/null +++ b/EXTENDEDCHANGELOG.md @@ -0,0 +1,11 @@ +HabitRPG +# (2014-01-16) + + +## Chore + +- **changelog:** add commit-msg hook to verify commit messages + +## Breaking Changes + + diff --git a/Gruntfile.js b/Gruntfile.js index 38d3543b77..884aa0daf8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -4,6 +4,24 @@ module.exports = function(grunt) { // Project configuration. grunt.initConfig({ + git_changelog: { + minimal: { + options: { + repo_url: 'https://github.com/habitrpg/habitrpg', + appName : 'HabitRPG', + branch_name: 'develop' + } + }, + extended: { + options: { + file: 'EXTENDEDCHANGELOG.md', + repo_url: 'https://github.com/habitrpg/habitrpg', + appName : 'HabitRPG', + branch_name: 'develop', + grep_commits: '^fix|^feat|^docs|^refactor|^chore|BREAKING' + } + } + }, karma: { unit: { @@ -124,5 +142,6 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-hashres'); grunt.loadNpmTasks('grunt-karma'); + grunt.loadNpmTasks('git-changelog'); }; diff --git a/package.json b/package.json index 00a4ab9d07..864bc1f085 100644 --- a/package.json +++ b/package.json @@ -80,6 +80,7 @@ "mongoskin": "~0.6.1", "expect.js": "~0.2.0", "superagent": "~0.15.7", - "superagent-defaults": "~0.1.5" + "superagent-defaults": "~0.1.5", + "git-changelog": "colegleason/git-changelog" } }