-
Notifications
You must be signed in to change notification settings - Fork 17
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
e364432
commit c6f290e
Showing
3 changed files
with
91 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#!/usr/bin/env node | ||
'use strict'; | ||
|
||
/* | ||
* This script generates the template a changelog by comparing a current version | ||
* with master. Run this, copy what's logged into the `CHANGELOG.md` and update | ||
* the top section based on the changes listed in "Community Contributions" | ||
* | ||
* Usage: | ||
* | ||
* bin/changelog | ||
*/ | ||
|
||
var EOL = require('os').EOL; | ||
var Promise = require('ember-cli/lib/ext/promise'); | ||
var GitHubApi = require('github'); | ||
|
||
var github = new GitHubApi({version: '3.0.0'}); | ||
var compareCommits = Promise.denodeify(github.repos.compareCommits); | ||
var currentVersion = 'v' + require('../package').version; | ||
|
||
compareCommits({ | ||
user: 'levelbossmike', | ||
repo: 'ember-deploy-redis', | ||
base: currentVersion, | ||
head: 'master' | ||
}).then(function(res) { | ||
return res.commits.map(function(commitInfo) { | ||
return commitInfo.commit.message | ||
|
||
}).filter(function(message) { | ||
return message.indexOf('Merge pull request #') > -1; | ||
|
||
}).map(function(message) { | ||
var numAndAuthor = message.match(/#(\d+) from (.*)\//).slice(1,3); | ||
var title = message.split('\n\n')[1]; | ||
|
||
return { | ||
number: +numAndAuthor[0], | ||
author: numAndAuthor[1], | ||
title: title | ||
}; | ||
|
||
}).sort(function(a, b) { | ||
return a.number > b.number; | ||
}).map(function(pr) { | ||
var link = '[#' + pr.number + ']' + | ||
'(https://github.com/levelbossmike/ember-deploy-redis/pull/' + pr.number + ')'; | ||
var title = pr.title; | ||
var author = '[@' + pr.author + ']' + | ||
'(https://github.com/' + pr.author +')'; | ||
|
||
return '- ' + link + ' ' + title + ' ' + author; | ||
|
||
}).join('\n'); | ||
|
||
}).then(function(contributions) { | ||
var changelog = generateChangelog(contributions); | ||
|
||
console.log(changelog); | ||
}).catch(function(err) { | ||
console.error(err); | ||
}) | ||
|
||
function generateChangelog(contributions) { | ||
var header = '#### Community Contributions'; | ||
var footer = 'Thank you to all who took the time to contribute!'; | ||
|
||
return header + EOL + EOL + contributions + EOL + EOL + footer; | ||
} |
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,19 @@ | ||
### 0.0.6 | ||
|
||
This release adds an improvement for ssh-tunneling. see [#15](https://github.com/levelbossmike/ember-deploy-redis/pull/15) for details. | ||
|
||
#### Community Contributions | ||
|
||
- [#16](https://github.com/levelbossmike/ember-deploy-redis/pull/16) Updated docs to clarify tunnel-ssh options [@tmayr](https://github.com/tmayr) | ||
|
||
### 0.0.5 | ||
|
||
This release brings the long awaited SSH-tunneling feature. | ||
|
||
#### Community Contributions | ||
|
||
- [#9](https://github.com/levelbossmike/ember-deploy-redis/pull/9) Add support for SSH tunneling [@tim-evans](https://github.com/tim-evans) | ||
- [#10](https://github.com/levelbossmike/ember-deploy-redis/pull/10) Allow camelCase auth_pass in adapter config [@jayphelps](https://github.com/jayphelps) | ||
- [#11](https://github.com/levelbossmike/ember-deploy-redis/pull/11) Fix a typo [@raw1z](https://github.com/raw1z) | ||
|
||
Thank you to all who took the time to contribute! |
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