Skip to content

Commit

Permalink
feat(options): Added ignore tags option
Browse files Browse the repository at this point in the history
  • Loading branch information
rafinskipg committed Oct 11, 2014
1 parent 2285551 commit 95362e8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 39 deletions.
36 changes: 0 additions & 36 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,6 @@
# (2014-10-11)


## Documentation

- Added docs
([e0ba50c0](https:/rafinskipg/git-changelog/commits/e0ba50c0bb0b13e9b39a59b8f4dda96e86d55644))
- **readme:** Final readme Fixes #1 Closes #1
([e725d8f4](https:/rafinskipg/git-changelog/commits/e725d8f4bf477b517ca6185a75fdfa0aa660b3be))


## Bug Fixes

- **git_changelog_generate:** pass tag if it exists to gitReadLog
([7c801927](https:/rafinskipg/git-changelog/commits/7c801927672792fc9a818653b74c78d77c7bff9e),
[#5](https:/rafinskipg/git-changelog/issues/5))
- **package.json:** move q to dependancies since it is required to run
([257119cf](https:/rafinskipg/git-changelog/commits/257119cf2bb6d8f341a5d65a2f47bcf803dff205))


## Features

- Working on new API
([121b9928](https:/rafinskipg/git-changelog/commits/121b99285d2a04f9159951fa0e3f849d0d618fef))
- **bootstrap:** creating initial structure
([dea45d68](https:/rafinskipg/git-changelog/commits/dea45d68ce9555e876680bf7c0778add2f367a30))
- **grunt-plugin:**
- Commit for research purposes
([5afbb7a9](https:/rafinskipg/git-changelog/commits/5afbb7a95c9f0e985f78666e7e231967524a8928))
- Now it is ready to be a grunt plugin
([6422e055](https:/rafinskipg/git-changelog/commits/6422e0552b30f6e94d11b03310a23c1342aa5965))


## Docs

- Added docs
- **readme:** Final readme Fixes #1 Closes #1


## Breaking Changes


2 changes: 2 additions & 0 deletions EXTENDEDCHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
- **git_changelog_generate:** pass tag if it exists to gitReadLog
([7c801927](https:/rafinskipg/git-changelog/commits/7c801927672792fc9a818653b74c78d77c7bff9e),
[#5](https:/rafinskipg/git-changelog/issues/5))
- **nested lists:** nested list fix. Closes #9
([22855518](https:/rafinskipg/git-changelog/commits/2285551810919bd4d8a749ae3ddd88f9cedcdd0e))
- **package.json:** move q to dependancies since it is required to run
([257119cf](https:/rafinskipg/git-changelog/commits/257119cf2bb6d8f341a5d65a2f47bcf803dff205))

Expand Down
1 change: 1 addition & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ module.exports = function(grunt) {
options: {
repo_url: 'https:/rafinskipg/git-changelog',
appName : 'Git changelog extended',
ignore_tags: true,
file : 'EXTENDEDCHANGELOG.md',
grep_commits: '^fix|^feat|^docs|^refactor|^chore|BREAKING'
}
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ grunt.initConfig({
* **repo_url**: The url of the project. For issues and commits links. Defaults to ` `
* **version**: The version of the project. Defaults to ` `,
* **file**: The name of the file that will be generated. Defaults to `CHANGELOG.md`,
* **appName** : The name of the projcect. Defaults to `My App - Changelog`
* **appName** : The name of the project. Defaults to `My App - Changelog`
* **ignore_tags** : Ignore tags, read from the beggining of the history. Defaults to `false`
* **grep_commits**: The commits that will be picked. Defaults to `'^fix|^feat|^docs|^refactor|^chore|BREAKING'`

## Git Commit Guidelines - Source : "Angular JS"
Expand Down
5 changes: 3 additions & 2 deletions tasks/git_changelog_generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var q = require('q');

var OPTS = {};
var PROVIDER, GIT_LOG_CMD, GIT_NOTAG_LOG_CMD,
IGNORE_TAGS = false,
//ALLOWED_COMMITS = '^fix|^feat|^docs|BREAKING',
//git-describe - Show the most recent tag that is reachable from a commit
GIT_TAG_CMD = 'git describe --tags --abbrev=0',
Expand All @@ -27,7 +28,7 @@ var init = function(params){
OPTS = params;
//G \ B \ ---
PROVIDER = OPTS.repo_url.indexOf('github.com') !== -1 ? 'G' :'B';

IGNORE_TAGS = OPTS.ignore_tags ? true : false;
//Log commits
GIT_LOG_CMD = 'git log ' + OPTS.branch_name + ' --grep="%s" -E --format=%s %s..HEAD';
GIT_NOTAG_LOG_CMD = 'git log ' + OPTS.branch_name + ' --grep="%s" -E --format=%s';
Expand Down Expand Up @@ -253,7 +254,7 @@ var generate = function(params) {
getPreviousTag().then(function(tag) {
var fn ;

if(typeof(tag) !== 'undefined'){
if(typeof(tag) !== 'undefined' && !IGNORE_TAGS){
console.log('Reading git log since', tag);
fn = function(){ return readGitLog(GIT_LOG_CMD, tag);};
}else{
Expand Down

0 comments on commit 95362e8

Please sign in to comment.