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 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)
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.