Skip to content

Commit

Permalink
Merge pull request #74 from lewiscowper/add-init-option
Browse files Browse the repository at this point in the history
feat: add init option as an alternative to setup
  • Loading branch information
christophwitzko committed Jan 25, 2016
2 parents cdfb57b + 854d716 commit cf3541b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions README.md
Expand Up @@ -28,12 +28,15 @@ semantic-release-cli setup
--ask-for-passwords Ask for the passwords even if passwords are stored [default: false].
--tag=<String> npm tag to install [default: 'latest'].

Aliases:
init setup

## What it Does
__semantic-release-cli performs the following steps:__

1. Asks for the information it needs. You will need to provide it with:
* Whether your GitHub repository is public or private
* Which NPM registry you want to use (Default: https://registry.npmjs.org/)
* Which NPM registry you want to use (Default: https://registry.npmjs.org/)
* Your NPM username (unless passwords were previously saved to keychain)
* Your NPM email
* Your NPM password
Expand Down Expand Up @@ -64,7 +67,7 @@ __semantic-release-cli performs the following steps:__

## Other CI Servers

By default, `semantic-release-cli` supports the popular Travis CI server. If you select `Other` as your server during configuration, `semantic-release-cli` will print out the environment variables you need to set on your CI server. You will be responsible for adding these environment variables as well as configuring your CI server to run `npm run semantic-release` after all the builds pass.
By default, `semantic-release-cli` supports the popular Travis CI server. If you select `Other` as your server during configuration, `semantic-release-cli` will print out the environment variables you need to set on your CI server. You will be responsible for adding these environment variables as well as configuring your CI server to run `npm run semantic-release` after all the builds pass.

Note that your CI server will also need to set the environment variable `CI=true` so that `semantic-release` will not perform a dry run. (Most CI services do this by default.) See the `semantic-release` documentation for more details.

Expand Down
7 changes: 5 additions & 2 deletions src/index.js
Expand Up @@ -49,7 +49,7 @@ module.exports = function (argv) {
process.exit(0)
}

if (info.options.argv.remain[0] !== 'setup' || info.options.help) {
if (info.options.argv.remain[0] !== 'setup' || info.options.argv.remain[0] !== 'init' || info.options.help) {
console.log(`
semantic-release-cli
Expand All @@ -63,7 +63,10 @@ Options:
--ask-for-passwords Ask for the passwords even if passwords are stored [default: false].
--tag=<String> npm tag to install [default: 'latest'].
--gh-token=<String> Github auth token
--npm-token=<String> NPM auth token`)
--npm-token=<String> NPM auth token
Aliases:
init setup`)
process.exit(0)
}

Expand Down

0 comments on commit cf3541b

Please sign in to comment.