20 releases

0.1.19 Aug 9, 2018
0.1.18 May 29, 2018
0.1.16 Mar 20, 2018
0.1.15 Feb 23, 2018
0.1.9 Oct 21, 2017

#5 in Build Utils

Download history 98/week @ 2018-09-15 56/week @ 2018-09-22 216/week @ 2018-09-29 232/week @ 2018-10-06 560/week @ 2018-10-13 325/week @ 2018-10-20 301/week @ 2018-10-27 497/week @ 2018-11-03 1364/week @ 2018-11-10 1943/week @ 2018-11-17 206/week @ 2018-11-24 978/week @ 2018-12-01 1191/week @ 2018-12-08

1,524 downloads per month
Used in 1 crate

Apache-2.0

578KB
577 lines

ci_info

crates.io Build Status Build status codecov
license Libraries.io for GitHub Documentation downloads
Built with cargo-make

Provides current CI environment information.

Overview

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.

Usage

Simply include the library and invoke the get function to pull all info as follows:

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());
    }
}

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"] }

API Documentation

See full docs at: API Docs

Contributing

See contributing guide

Release History

Date Version Description
2018-12-10 v0.3.0 Added optional serde support
2017-10-10 v0.1.0 Initial release.

License

Developed by Sagie Gur-Ari and licensed under the Apache 2 open source license.

Dependencies