conditional-travis-deploy

1.1.0 • Public • Published

conditional-travis-deploy

Build Status npm version License

Generic conditions for TravisCI deployment

Intended to be used within Travis's before_deploy block. Tries to determine which build/deployment type to perform based on the following conventions:

  • Pushes to develop: deploy to development
  • Pushes to master: deploy to staging
  • Tags: deploy to production

Throw on all other triggers.

Installation

npm install --save conditional-travis-deploy

Usage

var conditionalTravisDeploy = require('conditional-travis-deploy')
console.log(conditionalTravisDeploy)
//=> production

CLI

conditional-travis-deploy
#=> Error: TravisCI not found in process.env 
echo $?
#=> 1 
 
TRAVIS=true TRAVIS_BRANCH=master conditional-travis-deploy
#=> staging 

Author

© 2016 Tom Vincent git@tlvince.com (https://tlvince.com)

License

Released under the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i conditional-travis-deploy

Weekly Downloads

1

Version

1.1.0

License

MIT

Last publish

Collaborators

  • tlvince