24 releases

0.3.1 Jan 2, 2019
0.3.0 Dec 10, 2018
0.2.1 Nov 17, 2018
0.1.18 May 29, 2018
0.1.12 Nov 3, 2017

#11 in Build Utils

Download history 240/week @ 2018-10-11 384/week @ 2018-10-18 364/week @ 2018-10-25 1033/week @ 2018-11-01 1619/week @ 2018-11-08 972/week @ 2018-11-15 616/week @ 2018-11-22 1308/week @ 2018-11-29 1042/week @ 2018-12-06 278/week @ 2018-12-13 532/week @ 2018-12-20 419/week @ 2018-12-27 1009/week @ 2019-01-03 598/week @ 2019-01-10 1267/week @ 2019-01-17

3,184 downloads per month
Used in 12 crates (3 directly)

Apache-2.0

581KB
579 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
2019-01-02 v0.3.1 Maintenance
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