bearing/crates/bearing/build.rs
kjuulh 75bf2e0c71
feat: with initial
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-07-01 23:43:39 +02:00

10 lines
370 B
Rust

fn main() {
println!("cargo:rustc-env=SQLX_OFFLINE_DIR='./.sqlx'");
// When building in docs.rs, we want to set SQLX_OFFLINE mode to true
if std::env::var_os("DOCS_RS").is_some() {
println!("cargo:rustc-env=SQLX_OFFLINE=true");
} else if std::env::var_os("DOCKER_BUILD").is_some() {
println!("cargo:rustc-env=SQLX_OFFLINE=true");
}
}