Skip to content

Commit

Permalink
Release 0.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
LevelbossMike committed Jun 14, 2015
1 parent e364432 commit c6f290e
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 1 deletion.
70 changes: 70 additions & 0 deletions bin/changelog
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;
}
19 changes: 19 additions & 0 deletions changelog.md
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!
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ember-deploy-redis",
"version": "0.0.5",
"version": "0.0.6",
"description": "ember-cli-deploy index-adapter for redis",
"directories": {
"doc": "doc",
Expand All @@ -22,6 +22,7 @@
"chai": "^2.3.0",
"chai-as-promised": "^5.0.0",
"ember-cli": "0.2.5",
"github": "^0.2.4",
"mocha": "^2.2.5"
},
"keywords": [
Expand Down

0 comments on commit c6f290e

Please sign in to comment.