Skip to content

Commit

Permalink
feat(release): include docs generation
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Jul 9, 2017
1 parent 4b1b258 commit 07d3554
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmds/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ module.exports = {
describe: 'Genereate GitHub release',
default: true
},
docs: {
describe: 'Generate and publish documentation',
default: true
},
ghtoken: {
describe: 'Access token for generating GitHub releases',
type: 'string',
Expand Down
8 changes: 8 additions & 0 deletions src/release/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const lint = require('../lint')
const test = require('../test')
const build = require('../build')
const utils = require('../utils')
const docs = require('../docs')

const releaseChecks = require('./prerelease')
const bump = require('./bump')
Expand All @@ -18,6 +19,9 @@ const publish = require('./publish')
const push = require('./push')

function release (opts) {
// enable publishing for docs
opts.publish = true

const tasks = new Listr([{
title: 'Lint',
task: lint,
Expand Down Expand Up @@ -52,6 +56,10 @@ function release (opts) {
title: 'Generate GitHub Release',
task: github,
enabled: (ctx) => ctx.ghrelease
}, {
title: 'Publish documentation',
task: docs,
enabled: (ctx) => ctx.docs
}, {
title: 'Publish to npm',
task: publish,
Expand Down

0 comments on commit 07d3554

Please sign in to comment.