Skip to content

Commit

Permalink
Add --no-release-draft flag to skip opening a GitHub release draft …
Browse files Browse the repository at this point in the history
…page (#379)

Fixes #371
  • Loading branch information
MarcoScabbiolo authored and sindresorhus committed Apr 16, 2019
1 parent 45cea18 commit ce7e550
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
15 changes: 8 additions & 7 deletions readme.md
Expand Up @@ -63,13 +63,14 @@ $ np --help
patch | minor | major | prepatch | preminor | premajor | prerelease | 1.2.3
Options
--any-branch Allow publishing from any branch
--no-cleanup Skips cleanup of node_modules
--yolo Skips cleanup and testing
--no-publish Skips publishing
--tag Publish under a given dist-tag
--no-yarn Don't use Yarn
--contents Subdirectory to publish
--any-branch Allow publishing from any branch
--no-cleanup Skips cleanup of node_modules
--yolo Skips cleanup and testing
--no-publish Skips publishing
--tag Publish under a given dist-tag
--no-yarn Don't use Yarn
--contents Subdirectory to publish
--no-release-draft Skips opening a GitHub release draft
Examples
$ np
Expand Down
19 changes: 12 additions & 7 deletions source/cli.js
Expand Up @@ -21,13 +21,14 @@ const cli = meow(`
${version.SEMVER_INCREMENTS.join(' | ')} | 1.2.3
Options
--any-branch Allow publishing from any branch
--no-cleanup Skips cleanup of node_modules
--yolo Skips cleanup and testing
--no-publish Skips publishing
--tag Publish under a given dist-tag
--no-yarn Don't use Yarn
--contents Subdirectory to publish
--any-branch Allow publishing from any branch
--no-cleanup Skips cleanup of node_modules
--yolo Skips cleanup and testing
--no-publish Skips publishing
--tag Publish under a given dist-tag
--no-yarn Don't use Yarn
--contents Subdirectory to publish
--no-release-draft Skips opening a GitHub release draft
Examples
$ np
Expand All @@ -50,6 +51,10 @@ const cli = meow(`
publish: {
type: 'boolean'
},
releaseDraft: {
type: 'boolean',
default: true
},
tag: {
type: 'string'
},
Expand Down
1 change: 1 addition & 0 deletions source/index.js
Expand Up @@ -227,6 +227,7 @@ module.exports = async (input = 'patch', options) => {
tasks.add({
title: 'Creating release draft on GitHub',
enabled: () => isOnGitHub === true,
skip: () => options.releaseDraft,
task: () => releaseTaskHelper(options)
});

Expand Down

0 comments on commit ce7e550

Please sign in to comment.