git-changelog
Advanced tools
Comparing version 0.1.5 to 0.1.6
<a name="">Git changelog</a> | ||
# (2014-11-23) | ||
# (2015-04-18) | ||
## Documentation | ||
- added documentation for explaining the commit message | ||
--- | ||
<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> |
<a name="">Git changelog extended</a> | ||
# (2014-11-23) | ||
# (2015-04-18) | ||
@@ -55,2 +55,3 @@ | ||
- added documentation for explaining the commit message | ||
- Added docs | ||
@@ -57,0 +58,0 @@ - **readme:** Final readme Fixes #1 Closes #1 |
@@ -41,3 +41,3 @@ /* | ||
app_name : 'Since tag 1 changelog', | ||
file: 'outputs/tag1.md', | ||
file: 'output/tag1.md', | ||
tag: 'v0.0.1', | ||
@@ -90,4 +90,4 @@ debug: true | ||
// By default, lint and run all tests. | ||
grunt.registerTask('ch', ['jshint', 'git_changelog']); | ||
grunt.registerTask('ch', [ 'git_changelog']); | ||
}; |
{ | ||
"name": "git-changelog", | ||
"description": "A git changelog based on ANGULAR JS commit standards", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"homepage": "https://github.com/rafinskipg/git-changelog", | ||
@@ -6,0 +6,0 @@ "author": { |
# git-changelog | ||
[![Build Status](https://travis-ci.org/rafinskipg/git-changelog.svg)](https://travis-ci.org/rafinskipg/git-changelog) | ||
> A git changelog based on ANGULAR JS commit standards. [NPM page](https://www.npmjs.org/package/git-changelog) | ||
@@ -10,3 +12,3 @@ | ||
You can see an example generated changelog [here](https://github.com/rafinskipg/git-changelog/blob/master/CHANGELOG.md) | ||
You can see an example generated changelog [here](https://github.com/rafinskipg/git-changelog/blob/master/output/tag1.md) | ||
@@ -123,2 +125,8 @@ It works as a **grunt plugin** or **CLI**, see options below | ||
Example commit message | ||
``` | ||
git commit -m "docs: added documentation for explaining the commit message" | ||
``` | ||
### Type | ||
@@ -125,0 +133,0 @@ Must be one of the following: |
@@ -10,60 +10,63 @@ #!/usr/bin/env node | ||
program | ||
.version('0.1.5') | ||
.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); | ||
if (process.argv.join('').indexOf('/grunt') === -1) { | ||
console.log('Executing git changelog:'); | ||
if (program.extended){ | ||
console.log(' - Extended, getting log since the BigBang'); | ||
options.ignore_tags = true; | ||
} | ||
program | ||
.version('0.1.6') | ||
.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); | ||
if (program.app_name){ | ||
options.app_name = program.app_name; | ||
} | ||
console.log('Executing git changelog:'); | ||
if (program.extended){ | ||
console.log(' - Extended, getting log since the BigBang'); | ||
options.ignore_tags = true; | ||
} | ||
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.app_name){ | ||
options.app_name = program.app_name; | ||
} | ||
if (program.file){ | ||
options.file = program.file; | ||
} | ||
if (program.url){ | ||
options.repo_url = program.url; | ||
console.log(' - With URL %s', program.url); | ||
} | ||
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.tag != undefined){ | ||
options.tag = program.tag; | ||
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 === false){ | ||
console.log(' - No tag, getting log since the BigBang'); | ||
}else{ | ||
console.log(' - Generating log since tag %s', program.tag); | ||
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; | ||
} | ||
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); | ||
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!') | ||
}); | ||
git_changelog.generate(options).then(function(){ | ||
console.log('Finished generating log Yai!') | ||
}); | ||
} |
@@ -51,3 +51,5 @@ /* | ||
}) | ||
.catch(deferred.reject); | ||
.catch(function(){ | ||
deferred.reject("Sorry, you doesn't have configured any origin remote or passed a `repo_url` config value"); | ||
}); | ||
@@ -278,4 +280,4 @@ return deferred.promise; | ||
child.exec(GIT_REPO_URL_CMD, function(code, stdout, stderr) { | ||
if (code){ | ||
deferred.resolve(); | ||
if (code){ | ||
deferred.reject(); | ||
} else { | ||
@@ -318,3 +320,3 @@ stdout = stdout.replace('\n', '').replace('.git', ''); | ||
.catch(function(err){ | ||
log('Error generating changelog ', err); | ||
console.log('Error generating changelog ', err); | ||
deferred.reject(err); | ||
@@ -321,0 +323,0 @@ }) |
@@ -92,3 +92,3 @@ 'use strict'; | ||
it('should create tag1.md', function(){ | ||
var exists_file = fs.existsSync('outputs/tag1.md'); | ||
var exists_file = fs.existsSync('output/tag1.md'); | ||
expect(exists_file).to.equal(true); | ||
@@ -95,0 +95,0 @@ }); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34295
571
171