Check if your code is running on Travis-CI build
is-travis-ci-build-for-tag is related, only for a tag.
This is based on is-travis.
$ npm install --save is-travis-ci-build
var isTravisCiBuild = require('is-travis-ci-build');
// on your local computer
isTravisCiBuild();
//=> false
// on Travis-CI build
isTravisCiBuild();
//=> true
$ npm install --global is-travis-ci-build
$ is-travis-ci-build --help
Check if your code is running on Travis-CI build.
Usage
$ is-travis-ci-build
Examples
// on your local computer
$ is-travis-ci-build
This is not Travis-CI build. //=> exit code: 1
// on Travis-CI build
$ is-travis-ci-build
(no output) //=> exit code: 0
MIT © sanemat
MIT © Sindre Sorhus