Skip to content

Commit d260704

Browse files
committed
Release v0.1.0-beta.1
1 parent 735bae3 commit d260704

File tree

5 files changed

+147
-2
lines changed

5 files changed

+147
-2
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#### Community Contributions
2+
3+
- [#1](https://github.com/zapnito/ember-cli-deploy-redis/pull/1) Deploy to Redis [@achambers](https://github.com/achambers)
4+
- [#2](https://github.com/zapnito/ember-cli-deploy-redis/pull/2) Now we're using user defined config over context [@achambers](https://github.com/achambers)
5+
- [#3](https://github.com/zapnito/ember-cli-deploy-redis/pull/3) Allow configuration of redis using a url property instead of host/port/etc [@lukemelia](https://github.com/lukemelia)
6+
- [#4](https://github.com/zapnito/ember-cli-deploy-redis/pull/4) Update description and repo in package.json [@lukemelia](https://github.com/lukemelia)
7+
- [#5](https://github.com/zapnito/ember-cli-deploy-redis/pull/5) Allow keyPrefix to be configurable. Defaults to "[project name]:index" [@lukemelia](https://github.com/lukemelia)
8+
- [#6](https://github.com/zapnito/ember-cli-deploy-redis/pull/6) Use new `configure` hook instead of `willDeploy` [@achambers](https://github.com/achambers)
9+
- [#8](https://github.com/zapnito/ember-cli-deploy-redis/pull/8) Implement `activate` hook [@achambers](https://github.com/achambers)
10+
- [#9](https://github.com/zapnito/ember-cli-deploy-redis/pull/9) Added didDeploy hook [@lukemelia](https://github.com/lukemelia)
11+
- [#11](https://github.com/zapnito/ember-cli-deploy-redis/pull/11) Plugin base class restructure [@achambers](https://github.com/achambers)
12+
- [#12](https://github.com/zapnito/ember-cli-deploy-redis/pull/12) Make filePattern relative to context.distDir [@achambers](https://github.com/achambers)
13+
- [#13](https://github.com/zapnito/ember-cli-deploy-redis/pull/13) Fixed a bug in activate hook logging [@lukemelia](https://github.com/lukemelia)
14+
- [#14](https://github.com/zapnito/ember-cli-deploy-redis/pull/14) Update README for v0.5.0 [@achambers](https://github.com/achambers)
15+
- [#15](https://github.com/zapnito/ember-cli-deploy-redis/pull/15) Make filePattern config relative to distDir [@achambers](https://github.com/achambers)
16+
- [#16](https://github.com/zapnito/ember-cli-deploy-redis/pull/16) Update ember-cli-deploy-plugin version for bugfix. [@lukemelia](https://github.com/lukemelia)
17+
- [#17](https://github.com/zapnito/ember-cli-deploy-redis/pull/17) Update for ember-cli-deploy CLI changes [@lukemelia](https://github.com/lukemelia)
18+
- [#18](https://github.com/zapnito/ember-cli-deploy-redis/pull/18) Read config from configured name path instead of static 'redis' key [@dschmidt](https://github.com/dschmidt)
19+
- [#19](https://github.com/zapnito/ember-cli-deploy-redis/pull/19) Pass through database number [@dschmidt](https://github.com/dschmidt)
20+
- [#21](https://github.com/zapnito/ember-cli-deploy-redis/pull/21) Very small typo [@zapnito](https://github.com/zapnito)
21+
- [#22](https://github.com/zapnito/ember-cli-deploy-redis/pull/22) Fixed typo [@zapnito](https://github.com/zapnito)
22+
23+
Thank you to all who took the time to contribute!

RELEASE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Release
2+
3+
The following steps should navigate you through the release process to ensure as few issues as possible.
4+
5+
## Steps
6+
7+
### Commit the changelog and publish to NPM
8+
9+
1. run `./bin/changelog` and add output to `CHANGELOG.md`
10+
2. edit changelog output to be as user-friendly as possible (drop [INTERNAL] changes etc.)
11+
3. bump package.json version
12+
4. `./bin/prepare-release`
13+
5. `git checkout master`
14+
6. `git add` the modified `package.json` and `CHANGELOG.md`
15+
7. `git commit -m "Release vx.y.z"`
16+
8. `git push upstream master`
17+
9. `git tag "vx.y.z"`
18+
10. `git push upstream vx.y.z`
19+
11. `npm publish ./ember-cli-deploy-revision-key-<version>.tgz`
20+
21+
### Create a github release
22+
23+
1. under `Releases` on GitHub choose `Draft New Release`
24+
2. enter the new version number created above as the tag, prefixed with v e.g. (v0.1.12)
25+
3. for release title choose a great name, no pressure.
26+
4. in the description paste the upgrade instructions from the previous release, followed by the new CHANGELOG entry
27+
5. publish the release

bin/changelog

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
#!/usr/bin/env node
2+
'use strict';
3+
4+
/*
5+
* This script generates the template a changelog by comparing a current version
6+
* with master. Run this, copy what's logged into the `CHANGELOG.md` and update
7+
* the top section based on the changes listed in "Community Contributions"
8+
*
9+
* Usage:
10+
*
11+
* bin/changelog
12+
*/
13+
14+
var EOL = require('os').EOL;
15+
var multiline = require('multiline');
16+
var Promise = require('ember-cli/lib/ext/promise');
17+
var GitHubApi = require('github');
18+
19+
var github = new GitHubApi({version: '3.0.0'});
20+
var compareCommits = Promise.denodeify(github.repos.compareCommits);
21+
var currentVersion = 'v' + require('../package').version;
22+
23+
var user = 'zapnito';
24+
var repo = 'ember-cli-deploy-redis';
25+
26+
compareCommits({
27+
user: user,
28+
repo: repo,
29+
base: currentVersion,
30+
head: 'master'
31+
}).then(function(res) {
32+
return res.commits.map(function(commitInfo) {
33+
return commitInfo.commit.message
34+
35+
}).filter(function(message) {
36+
return message.indexOf('Merge pull request #') > -1;
37+
38+
}).map(function(message) {
39+
var numAndAuthor = message.match(/#(\d+) from (.*)\//).slice(1,3);
40+
var title = message.split('\n\n')[1];
41+
42+
return {
43+
number: +numAndAuthor[0],
44+
author: numAndAuthor[1],
45+
title: title
46+
};
47+
48+
}).sort(function(a, b) {
49+
return a.number > b.number;
50+
}).map(function(pr) {
51+
var link = '[#' + pr.number + ']' +
52+
'(https://github.com/' + user + '/' + repo + '/pull/' + pr.number + ')';
53+
var title = pr.title;
54+
var author = '[@' + pr.author + ']' +
55+
'(https://github.com/' + pr.author +')';
56+
57+
return '- ' + link + ' ' + title + ' ' + author;
58+
59+
}).join('\n');
60+
61+
}).then(function(contributions) {
62+
var changelog = generateChangelog(contributions);
63+
64+
console.log(changelog);
65+
}).catch(function(err) {
66+
console.error(err);
67+
})
68+
69+
function generateChangelog(contributions) {
70+
var header = multiline(function() {/*
71+
The following changes are required if you are upgrading from the previous
72+
version:
73+
- Users
74+
+ Upgrade your project's ember-cli version - [docs](http://www.ember-cli.com/#project-update)
75+
- Addon Developers
76+
+ No changes required
77+
- Core Contributors
78+
+ No changes required
79+
#### Community Contributions
80+
*/});
81+
82+
var footer = 'Thank you to all who took the time to contribute!';
83+
84+
return header + EOL + EOL + contributions + EOL + EOL + footer;
85+
}

bin/prepare-release

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
3+
rm -rf node_modules && \
4+
rm -rf ./ember-cli-deploy-redis*.tgz && \
5+
npm cache clear && \
6+
npm i --no-optional && \
7+
npm link --no-optional && \
8+
npm pack

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ember-cli-deploy-redis",
3-
"version": "0.0.0",
3+
"version": "0.1.0-beta.1",
44
"description": "Ember CLI Deploy plugin to deploy file(s) into redis.",
55
"directories": {
66
"doc": "doc",
@@ -34,8 +34,10 @@
3434
"ember-disable-prototype-extensions": "^1.0.0",
3535
"ember-export-application-global": "^1.0.2",
3636
"ember-try": "0.0.4",
37+
"github": "^0.2.4",
3738
"glob": "^5.0.5",
38-
"mocha": "^2.2.4"
39+
"mocha": "^2.2.4",
40+
"multiline": "^1.0.2"
3941
},
4042
"keywords": [
4143
"ember-addon",

0 commit comments

Comments
 (0)