# ci_info
[](https://crates.io/crates/ci_info) [](http://travis-ci.org/sagiegurari/ci_info) [](https://ci.appveyor.com/project/sagiegurari/ci-info) [](https://codecov.io/gh/sagiegurari/ci_info)<br>
[](https://github.com/sagiegurari/ci_info/blob/master/LICENSE) [](https://libraries.io/cargo/ci_info) [](https://docs.rs/crate/ci_info/) [](https://crates.io/crates/ci_info)<br>
[](https://sagiegurari.github.io/cargo-make)
> Provides current CI environment information.
* [Overview](#overview)
* [Usage](#usage)
* [Installation](#installation)
* [API Documentation](https://sagiegurari.github.io/ci_info/)
* [Contributing](.github/CONTRIBUTING.md)
* [Release History](#history)
* [License](#license)
<a name="overview"></a>
## Overview
This library main goal is to provide development/build tools such as [cargo-make](https://sagiegurari.github.io/cargo-make/) the needed information on the current CI environment.<br>
The code is based on the [ci-info](https://github.com/watson/ci-info) npm module.
<a name="usage"></a>
## Usage
Simply include the library and invoke the get function to pull all info as follows:
````rust
extern crate ci_info;
fn main() {
// Just check if a CI environment is detected.
let ci = ci_info::is_ci();
println!("Is CI: {}", ci);
// Get CI environment information
let info = ci_info::get();
println!("Is CI: {}", info.ci);
if info.ci {
println!("Vendor: {:#?}", info.vendor.unwrap());
}
}
````
<a name="installation"></a>
## Installation
In order to use this library, just add it as a dependency:
```ini
[dependencies]
ci_info = "*"
```
## API Documentation
See full docs at: [API Docs](https://sagiegurari.github.io/ci_info/)
## Contributing
See [contributing guide](.github/CONTRIBUTING.md)
<a name="history"></a>
## Release History
| 2017-12-14 | v0.1.13 | Maintenance |
| 2017-10-10 | v0.1.0 | Initial release. |
<a name="license"></a>
## License
Developed by Sagie Gur-Ari and licensed under the Apache 2 open source license.