@npmcli/ci-detect
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -13,2 +13,7 @@ module.exports = () => | ||
: process.env.GO_PIPELINE_NAME ? 'gocd' | ||
: process.env.WERCKER ? 'wercker' | ||
: process.env.NETLIFY ? 'netlify' | ||
: process.env.NOW_GITHUB_DEPLOYMENT ? 'now-github' | ||
: process.env.GITLAB_DEPLOYMENT ? 'now-gitlab' | ||
: process.env.BITBUCKET_DEPLOYMENT ? 'now-bitbucket' | ||
// codeship and a few others | ||
@@ -15,0 +20,0 @@ : process.env.CI_NAME ? process.env.CI_NAME |
{ | ||
"name": "@npmcli/ci-detect", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "Detect what kind of CI environment the program is in", | ||
@@ -5,0 +5,0 @@ "author": "Isaac Z. Schlueter <i@izs.me> (https://izs.me)", |
@@ -32,6 +32,14 @@ # @npmcli/ci-detect | ||
* `'gocd'` GoCD | ||
* `'codeship'` CodeShip (or any that set `CI_NAME` environment variable) | ||
* `'wercker'` Oracle Wercker | ||
* `'netlify'` Netlify | ||
* `'now-github'` Zeit.co's Now for GitHub deployment service | ||
* `'now-bitbucket'` Zeit.co's Now for BitBucket deployment service | ||
* `'now-gitlab'` Zeit.co's Now for GitLab deployment service | ||
* `'codeship'` CodeShip | ||
* Anything that sets the `CI_NAME` environment variable will return the | ||
value as the result. (This is how CodeShip is detected.) | ||
* `'travis-ci'` Travis-CI - A few other CI systems set `TRAVIS=1` in the | ||
environment, because devs use that to indicate "test mode", so this one | ||
can get some false positives. | ||
can get some false positives, and is tested later in the process to | ||
minimize this effect. | ||
* `'aws-codebuild'` AWS CodeBuild | ||
@@ -41,3 +49,4 @@ * `'builder'` Google Cloud Builder - This one is a bit weird. It doesn't | ||
`BUILDER_OUTPUT`, so it can get false positives pretty easily. | ||
* `'custom'` anything else that sets `CI` environment variable | ||
* `'custom'` anything else that sets `CI` environment variable to either | ||
`'1'` or `'true'`. | ||
@@ -44,0 +53,0 @@ ## Caveats |
4881
27
65