Skip to content

Commit

Permalink
Release v0.1.0-beta.1
Browse files Browse the repository at this point in the history
  • Loading branch information
achambers committed Aug 8, 2015
1 parent d2b47a5 commit 0993043
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 2 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#### Community Contributions

- [#1](https://github.com/zapnito/ember-cli-deploy-revision-key/pull/1) Create a tag form the hash of the index.html [@achambers](https://github.com/achambers)
- [#3](https://github.com/zapnito/ember-cli-deploy-revision-key/pull/3) Updated to be in line with how ember-cli-deploy handles context data [@achambers](https://github.com/achambers)
- [#4](https://github.com/zapnito/ember-cli-deploy-revision-key/pull/4) Remove dependency on index path [@achambers](https://github.com/achambers)
- [#5](https://github.com/zapnito/ember-cli-deploy-revision-key/pull/5) Now filePattern is relative to the dist dir stored in `context.distDir` [@achambers](https://github.com/achambers)
- [#6](https://github.com/zapnito/ember-cli-deploy-revision-key/pull/6) Rename index-hash to file-hash [@lukemelia](https://github.com/lukemelia)
- [#7](https://github.com/zapnito/ember-cli-deploy-revision-key/pull/7) Change to use `configure` hook instead of `willDeploy` [@achambers](https://github.com/achambers)
- [#8](https://github.com/zapnito/ember-cli-deploy-revision-key/pull/8) Renamed project and all references to `tags` [@achambers](https://github.com/achambers)
- [#9](https://github.com/zapnito/ember-cli-deploy-revision-key/pull/9) `configure` primes the config with data from the deployment context [@achambers](https://github.com/achambers)
- [#10](https://github.com/zapnito/ember-cli-deploy-revision-key/pull/10) Restructure to use ember-cli-deploy-plugin, and complete rename to em… [@lukemelia](https://github.com/lukemelia)
- [#12](https://github.com/zapnito/ember-cli-deploy-revision-key/pull/12) Update README for v0.5.0 [@achambers](https://github.com/achambers)

Thank you to all who took the time to contribute!
27 changes: 27 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Release

The following steps should navigate you through the release process to ensure as few issues as possible.

## Steps

### Commit the changelog and publish to NPM

1. run `./bin/changelog` and add output to `CHANGELOG.md`
2. edit changelog output to be as user-friendly as possible (drop [INTERNAL] changes etc.)
3. bump package.json version
4. `./bin/prepare-release`
5. `git checkout master`
6. `git add` the modified `package.json` and `CHANGELOG.md`
7. `git commit -m "Release vx.y.z"`
8. `git push upstream master`
9. `git tag "vx.y.z"`
10. `git push upstream vx.y.z`
11. `npm publish ./ember-cli-deploy-revision-key-<version>.tgz`

### Create a github release

1. under `Releases` on GitHub choose `Draft New Release`
2. enter the new version number created above as the tag, prefixed with v e.g. (v0.1.12)
3. for release title choose a great name, no pressure.
4. in the description paste the upgrade instructions from the previous release, followed by the new CHANGELOG entry
5. publish the release
85 changes: 85 additions & 0 deletions bin/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#!/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 multiline = require('multiline');
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;

var user = 'zapnito';
var repo = 'ember-cli-deploy-revision-key';

compareCommits({
user: user,
repo: repo,
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/' + user + '/' + repo + '/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 = multiline(function() {/*
The following changes are required if you are upgrading from the previous
version:
- Users
+ Upgrade your project's ember-cli version - [docs](http://www.ember-cli.com/#project-update)
- Addon Developers
+ No changes required
- Core Contributors
+ No changes required
#### Community Contributions
*/});

var footer = 'Thank you to all who took the time to contribute!';

return header + EOL + EOL + contributions + EOL + EOL + footer;
}
8 changes: 8 additions & 0 deletions bin/prepare-release
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

rm -rf node_modules && \
rm -rf ./ember-cli-deploy-revision-key*.tgz && \
npm cache clear && \
npm i --no-optional && \
npm link --no-optional && \
npm pack
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ember-cli-deploy-revision-key",
"version": "0.1.0",
"version": "0.1.0-beta.1",
"description": "An ember-cli-plugin to create a unique revision key for the build",
"directories": {
"doc": "doc",
Expand Down Expand Up @@ -34,8 +34,10 @@
"ember-disable-prototype-extensions": "^1.0.0",
"ember-export-application-global": "^1.0.2",
"ember-try": "0.0.4",
"github": "^0.2.4",
"glob": "^5.0.5",
"mocha": "^2.2.4"
"mocha": "^2.2.4",
"multiline": "^1.0.2"
},
"keywords": [
"ember-addon",
Expand Down

0 comments on commit 0993043

Please sign in to comment.