mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-27 17:22:57 +01:00
32 lines
739 B
Rust
32 lines
739 B
Rust
extern crate skeptic;
|
|
extern crate version_check;
|
|
|
|
use std::{env, fs};
|
|
|
|
|
|
#[cfg(unix)]
|
|
fn main() {
|
|
if env::var("USE_SKEPTIC").is_ok() {
|
|
// generates doc tests for `README.md`.
|
|
skeptic::generate_doc_tests(&["README.md", "guide/src/qs_2.md"]);
|
|
} else {
|
|
let f = env::var("OUT_DIR").unwrap() + "/skeptic-tests.rs";
|
|
let _ = fs::File::create(f);
|
|
}
|
|
|
|
match version_check::is_nightly() {
|
|
Some(true) => println!("cargo:rustc-cfg=actix_nightly"),
|
|
Some(false) => (),
|
|
None => (),
|
|
};
|
|
}
|
|
|
|
#[cfg(not(unix))]
|
|
fn main() {
|
|
match version_check::is_nightly() {
|
|
Some(true) => println!("cargo:rustc-cfg=actix_nightly"),
|
|
Some(false) => (),
|
|
None => (),
|
|
};
|
|
}
|