Skip to content

Commit

Permalink
fix(release): missing pieces
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Aug 25, 2017
1 parent ceae294 commit 471184f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 35 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ You can also specify `hooks.browser` and `hooks.node` if you have a different se

Because the mocha binary was the source of many pains tests in node are now run using [Jest](https://facebook.github.io/jest/). All important features should work as before, but if you were relying on a mocha specific feature it might break now.

### Scoped Github Token

The token needed for releases is now looked for after under `AEGIR_GHTOKEN`.

## Project Structure

The project structure when using this is quite strict, to ease
Expand Down Expand Up @@ -201,6 +205,8 @@ Webpack will use the specified file as the entry point and output it to `dist/<f

If `.aegir.js` file is not present in the project, webpack will use `src/index.js` as the default entry file.

This requires `AEGIR_GHTOKEN` to be set.

### Releasing

1. Run linting
Expand All @@ -210,8 +216,8 @@ If `.aegir.js` file is not present in the project, webpack will use `src/index.j
5. Generate a changelog based on the git log
6. Commit the version change & `CHANGELOG.md`
7. Create a git tag
8. Run `git push` to `upstream/master`
9. Publish a release to Github releases (if `GH_TOKEN` is available)
8. Run `git push` to `origin/master`
9. Publish a release to Github releases
10. Publish to npm

```bash
Expand Down
16 changes: 0 additions & 16 deletions src/release/docs.js

This file was deleted.

3 changes: 1 addition & 2 deletions src/release/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const bump = require('./bump')
const changelog = require('./changelog')
const commit = require('./commit')
const contributors = require('./contributors')
// const docs = require('./docs')
const github = require('./github')
const publish = require('./publish')
const push = require('./push')
Expand Down Expand Up @@ -58,7 +57,7 @@ function release (opts) {
enabled: (ctx) => ctx.ghrelease
}, {
title: 'Publish documentation',
task: docs,
task: () => docs,
enabled: (ctx) => ctx.docs
}, {
title: 'Publish to npm',
Expand Down
28 changes: 13 additions & 15 deletions src/release/push.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
'use strict'

module.exports = (gulp) => {
gulp.task('release:push', (done) => {
const util = require('gulp-util')
const git = require('gulp-git')
const git = require('simple-git')(process.cwd())
const pify = require('pify')

const utils = require('../../src/utils')

const remote = util.remote || 'origin'
util.log('Pushing to git...')
git.push(remote, 'master', {args: '--tags'}, (err) => {
if (err) return utils.fail(err.message)

util.log(`Pushed to git ${remote}:master`)
done()
})
})
function push () {
const remote = 'origin'
return pify(git.push.bind(git))(
remote,
'master',
{
'--tags': true
}
)
}

module.exports = push

0 comments on commit 471184f

Please sign in to comment.