inside-ci/README.md

27 lines
445 B
Markdown
Raw Normal View History

2024-11-18 23:24:04 +00:00
# inside-ci
2024-11-18 23:57:35 +00:00
Quick tool to check if we are inside a CI environment
# API
`insideCi()`
Returns true if inside CI. Otherwise returns false.
# CLI
2024-11-19 10:46:15 +00:00
## `inside-ci` or `in-ci`
2024-11-18 23:57:35 +00:00
Returns code 0 if inside CI. Otherwise returns an error code of 1.
2024-11-19 10:46:15 +00:00
* `inside-ci || echo 'We are not inside CI, install some stuff'`
* `in-ci && echo 'We are inside CI, install some stuff'`
2024-11-18 23:57:35 +00:00
Example:
`is-ci || husky install`
2024-11-19 10:46:15 +00:00
## `not-ci`
Inverse of the above command