Jonatan Nilsson
e866e58dda
All checks were successful
/ deploy (push) Successful in 25s
Clean the code a bit. Move comments to test to decrease dependency size Minify package.json for extra.
14 lines
348 B
JavaScript
Executable file
14 lines
348 B
JavaScript
Executable file
#!/usr/bin/env node
|
|
|
|
function insideCi() {
|
|
// Bail out if this is specifically overwritten to false.
|
|
if (process.env.CI === 'false') return false
|
|
|
|
return !!['CI','CI_APP_ID','BUILD_NUMBER','CI_NAME','RUN_ID'].some(x => process.env[x])
|
|
}
|
|
|
|
module.exports.insideCi = insideCi
|
|
|
|
if (require.main === module) {
|
|
process.exit(insideCi() ? 0 : 1)
|
|
}
|