Expand description
ci_info
Provides current CI environment information.
This library main goal is to provide development/build tools such as cargo-make the needed information on the current CI environment.
The code is based on the ci-info npm module.
Examples
Get CI environment information.
extern crate ci_info;
fn main() {
let info = ci_info::get();
println!("Is CI: {}", info.ci);
if info.ci {
println!("Vendor: {:#?}", info.vendor.unwrap());
}
}
Check if a CI environment is detected.
extern crate ci_info;
fn main() {
let ci = ci_info::is_ci();
println!("Is CI: {}", ci);
}
Installation
In order to use this library, just add it as a dependency:
[dependencies]
ci_info = "*"
There is optional serde
support that can be enabled via the serde-1
feature:
[dependencies]
ci_info = { version = "*", features = ["serde-1"] }
Contributing
License
Developed by Sagie Gur-Ari and licensed under the Apache 2 open source license.
Modules
types