-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d60038
commit 50af9f0
Showing
12 changed files
with
318 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<a name="">Since tag 1 changelog</a> | ||
# (2014-11-23) | ||
|
||
|
||
|
||
--- | ||
<sub><sup>*Generated with [git-changelog](https://github.com/rafinskipg/git-changelog). If you have any problem or suggestion, create an issue.* :) **Thanks** </sub></sup> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#!/usr/bin/env node | ||
|
||
|
||
'use strict'; | ||
var _ = require('lodash'); | ||
var program = require('commander'); | ||
var git_changelog = require('./git_changelog_generate'); | ||
var options = _.cloneDeep(require('./defaults')); | ||
|
||
program | ||
.version('0.1.3') | ||
.option('-e, --extended', 'Extended log') | ||
.option('-a, --app_name [app_name]', 'Name [app_name]') | ||
.option('-b, --branch [branch_name]', 'Branch name [branch_name]') | ||
.option('-f, --file [file]', 'File [file]') | ||
.option('-r, --repo_url [url]', 'Repo url [url]') | ||
.option('-t, --tag [tag]', 'Since tag [tag]') | ||
.option('-g, --grep [grep]', 'Grep commits for [grep]') | ||
.option('-d, --debug', 'Debugger') | ||
.parse(process.argv); | ||
|
||
console.log('Executing git changelog:'); | ||
if (program.extended){ | ||
console.log(' - Extended, getting log since the BigBang'); | ||
options.ignore_tags = true; | ||
} | ||
|
||
if (program.app_name){ | ||
options.app_name = program.app_name; | ||
} | ||
|
||
if (program.branch_name){ | ||
options.branch_name = program.branch_name; | ||
console.log(' - Branch %s', program.branch); | ||
} | ||
if (program.debug){ | ||
console.log('Debug enabled'); | ||
options.debug = program.debug; | ||
} | ||
|
||
if (program.file){ | ||
options.file = program.file; | ||
} | ||
if (program.url){ | ||
options.repo_url = program.url; | ||
console.log(' - With URL %s', program.url); | ||
} | ||
|
||
if (program.tag != undefined){ | ||
options.tag = program.tag; | ||
|
||
if(program.tag === false){ | ||
console.log(' - No tag, getting log since the BigBang'); | ||
}else{ | ||
console.log(' - Generating log since tag %s', program.tag); | ||
} | ||
} | ||
|
||
if (program.grep){ | ||
options.grep_commits = program.grep; | ||
} | ||
|
||
console.log(' - The APP name is %s', options.app_name); | ||
console.log(' - The output file is %s', options.file); | ||
|
||
git_changelog.generate(options).then(function(){ | ||
console.log('Finished generating log Yai!') | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
//Defaults options | ||
module.exports = { | ||
branch_name : '', | ||
//[G]ithub [B]itbucket supported at the momment | ||
repo_url: '', | ||
version : '', | ||
file: 'CHANGELOG.md', | ||
app_name : 'My app - Changelog', | ||
grep_commits: '^fix|^feat|^docs|BREAKING', | ||
tag: null, | ||
debug: false, | ||
//TODO : remove ignore tags | ||
ignore_tags: false, | ||
sections: [ | ||
{ | ||
title: 'Bug Fixes', | ||
grep: '^fix' | ||
}, | ||
{ | ||
title: 'Features', | ||
grep: '^feat' | ||
}, | ||
{ | ||
title: 'Documentation', | ||
grep: '^docs' | ||
}, | ||
{ | ||
title: 'Breaking changes', | ||
grep: 'BREAKING' | ||
}, | ||
{ | ||
title: 'Refactor', | ||
grep: '^refactor' | ||
}, | ||
{ | ||
title: 'Style', | ||
grep: '^style' | ||
}, | ||
{ | ||
title: 'Test', | ||
grep: '^test' | ||
}, | ||
{ | ||
title: 'Chore', | ||
grep: '^chore' | ||
} | ||
] | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.