conditional-travis-deploy
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 todevelopment
- Pushes to
master
: deploy tostaging
- Tags: deploy to
production
Throw on all other triggers.
Installation
npm install --save conditional-travis-deploy
Usage
var conditionalTravisDeploy = console//=> 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.