Skip to content

Commit

Permalink
fix(provider): Added provider option in the command
Browse files Browse the repository at this point in the history
  • Loading branch information
rafinskipg committed Jan 18, 2017
1 parent 4d539ac commit 8f3b3fe
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 3 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ _Git changelog is a utility tool for generating changelogs. It is free and opens



## Features

- **providers**
- Add possibility to set providers in the options
([14da6fee](https://github.com/rafinskipg/git-changelog/commit/14da6fee8aa8b1fcec198ea26812aa1871008438))





---
<sub><sup>*Generated with [git-changelog](https://github.com/rafinskipg/git-changelog). If you have any problems or suggestions, create an issue.* :) **Thanks** </sub></sup>
13 changes: 13 additions & 0 deletions EXTENDEDCHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ _Git changelog is a utility tool for generating changelogs. It is free and opens
- Restores versionName in CLI
([1d97f952](https://github.com/rafinskipg/git-changelog/commit/1d97f952bd5d37f67c1febdf161f4ce9b310eebf))

- **template**
- Fixes missing space in version_name output in template
([f494f4a9](https://github.com/rafinskipg/git-changelog/commit/f494f4a93a3c4a245f706cfb65f735a5ccccb2ce),
[#72](https://github.com/rafinskipg/git-changelog/issues/72))

- **travis**
- Removed 0.12 nodejs version, addd 7.3.0
([18190836](https://github.com/rafinskipg/git-changelog/commit/1819083690e70e0af28d0c155b6fa67cbeb1dfb3))
Expand Down Expand Up @@ -102,6 +107,10 @@ _Git changelog is a utility tool for generating changelogs. It is free and opens
- Added global install so you can run via command
([86eae3f0](https://github.com/rafinskipg/git-changelog/commit/86eae3f013ace1c5c23afc32b2e8f878a69629f1))

- **providers**
- Add possibility to set providers in the options
([14da6fee](https://github.com/rafinskipg/git-changelog/commit/14da6fee8aa8b1fcec198ea26812aa1871008438))

- **template**
- Load default template if no custom template is found
([41d5128b](https://github.com/rafinskipg/git-changelog/commit/41d5128b922efe3ced883a37bb4e170410160f4f))
Expand Down Expand Up @@ -355,6 +364,10 @@ _Git changelog is a utility tool for generating changelogs. It is free and opens


## Pull requests merged
- Merge pull request #74 from Treyone/master
([4d539ace](https://github.com/rafinskipg/git-changelog/commit/4d539ace7ff22a9be468270114109f2565203aa4))
- Merge pull request #73 from fabn/gitlab-links
([6df54f09](https://github.com/rafinskipg/git-changelog/commit/6df54f09ab62175b89a853d3695e8d43bfedac95))
- Merge pull request #70 from rafinskipg/templating
([5e60232c](https://github.com/rafinskipg/git-changelog/commit/5e60232cf92b66cf50f64f3a7734de98fe2637e7))
- Merge pull request #60 from seivan/feature/latest_tag_regardless_of_branch
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ This specification is used to grep the commits on your log, it contains a valid

* **branch** : The name of the branch. Defaults to ` `
* **repo_url** : The url of the project. For issues and commits links. Defaults to `git config --get remote.origin.url`
* **provider** : Optional field, the provider is calculated from the repo_url, but can also be passed as config parameter. Values available: gitlab, github, bitbucket.
* **version_name**: The version name of the project.
* **file**: The name of the file that will be generated. Defaults to `CHANGELOG.md`,
* **template**: The template for generating the changelog. It defaults to the one inside this project (/templates/template.md)
Expand Down Expand Up @@ -226,7 +227,7 @@ Use it directly with the common options
Options:
-h, --help output usage information
-V, --version output the version number of the package
-V, --version output the version number
-e, --extended Extended log
-n, --version_name [version_name] Name of the version
-a, --app_name [app_name] Name [app_name]
Expand All @@ -240,6 +241,7 @@ Use it directly with the common options
-rc, --changelogrc [changelogrc] .changelogrc relative path [changelogrc]
-g, --grep [grep] Grep commits for [grep]
-d, --debug Debugger
-p, --provider [provider] Provider: gitlab, github, bitbucket (Optional)
```

Expand Down
6 changes: 5 additions & 1 deletion output/customTemplate.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

_This changelog is generated with a custom template_

## squeezy potatoe v0.0.1 ( Fri Jan 06 2017 13:50:31 GMT+0100 (CET) )
## squeezy potatoe v0.0.1 ( Wed Jan 18 2017 13:36:19 GMT+0100 (CET) )


## Bug Fixes
Expand Down Expand Up @@ -33,6 +33,8 @@ _This changelog is generated with a custom template_
- move q to dependancies since it is required to run (257119cf2bb6d8f341a5d65a2f47bcf803dff205)
- **params**
- Restores versionName in CLI (1d97f952bd5d37f67c1febdf161f4ce9b310eebf)
- **template**
- Fixes missing space in version_name output in template (f494f4a93a3c4a245f706cfb65f735a5ccccb2ce, Closes: [#72](https://github.com/rafinskipg/git-changelog/issues/72))
- **travis**
- Removed 0.12 nodejs version, addd 7.3.0 (1819083690e70e0af28d0c155b6fa67cbeb1dfb3)

Expand All @@ -53,6 +55,8 @@ _This changelog is generated with a custom template_
- added logo in printHeader (6b489450a90172dc57059d7fd55fb4c6110152b2)
- **package**
- Added global install so you can run via command (86eae3f013ace1c5c23afc32b2e8f878a69629f1)
- **providers**
- Add possibility to set providers in the options (14da6fee8aa8b1fcec198ea26812aa1871008438)
- **template**
- Load default template if no custom template is found (41d5128b922efe3ced883a37bb4e170410160f4f)

Expand Down
11 changes: 10 additions & 1 deletion output/tag1.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

_This changelog is from the previous tag_

## squeezy potatoe v0.0.1 ( Fri Jan 06 2017 13:50:31 GMT+0100 (CET) )
## squeezy potatoe v0.0.1 ( Wed Jan 18 2017 13:36:19 GMT+0100 (CET) )


## Bug Fixes
Expand Down Expand Up @@ -64,6 +64,11 @@ _This changelog is from the previous tag_
- Restores versionName in CLI
([1d97f952](https://github.com/rafinskipg/git-changelog/commit/1d97f952bd5d37f67c1febdf161f4ce9b310eebf))

- **template**
- Fixes missing space in version_name output in template
([f494f4a9](https://github.com/rafinskipg/git-changelog/commit/f494f4a93a3c4a245f706cfb65f735a5ccccb2ce),
[#72](https://github.com/rafinskipg/git-changelog/issues/72))

- **travis**
- Removed 0.12 nodejs version, addd 7.3.0
([18190836](https://github.com/rafinskipg/git-changelog/commit/1819083690e70e0af28d0c155b6fa67cbeb1dfb3))
Expand All @@ -72,6 +77,10 @@ _This changelog is from the previous tag_


## Pull requests merged
- Merge pull request #74 from Treyone/master
([4d539ace](https://github.com/rafinskipg/git-changelog/commit/4d539ace7ff22a9be468270114109f2565203aa4))
- Merge pull request #73 from fabn/gitlab-links
([6df54f09](https://github.com/rafinskipg/git-changelog/commit/6df54f09ab62175b89a853d3695e8d43bfedac95))
- Merge pull request #70 from rafinskipg/templating
([5e60232c](https://github.com/rafinskipg/git-changelog/commit/5e60232cf92b66cf50f64f3a7734de98fe2637e7))
- Merge pull request #60 from seivan/feature/latest_tag_regardless_of_branch
Expand Down
6 changes: 6 additions & 0 deletions tasks/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if (process.argv.join('').replace(/\\/g,'/').indexOf('/grunt') === -1) {
.option('-rc, --changelogrc [changelogrc]', '.changelogrc relative path [changelogrc]')
.option('-g, --grep [grep]', 'Grep commits for [grep]')
.option('-d, --debug', 'Debugger')
.option('-p, --provider [provider]', 'Provider: gitlab, github, bitbucket (Optional)')
.parse(process.argv);

console.log('Executing git changelog:');
Expand Down Expand Up @@ -76,6 +77,11 @@ if (process.argv.join('').replace(/\\/g,'/').indexOf('/grunt') === -1) {
console.log(' - With URL %s', program.repo_url);
}

if (program.provider){
options.provider = program.provider;
console.log(' - With forced provider %s', program.provider);
}

if (program.tag !== undefined){
if(program.tag === false || program.tag === "false"){
options.tag = false;
Expand Down
1 change: 1 addition & 0 deletions tasks/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module.exports = {
branch : '',
//[G]ithub [B]itbucket supported at the momment
repo_url: '',
provider: null,
version_name : '',
file: 'CHANGELOG.md',
app_name : 'My app - Changelog',
Expand Down

0 comments on commit 8f3b3fe

Please sign in to comment.