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