forked from DevComp/ssh-portfolio
build(rs): include support for SKIP_PATCH_CRATE
env var
Setting `$SKIP_PATCH_CRATE` skips checking the patch application stage in build.rs which is triggered when the patch directory is changed.
This commit is contained in:
parent
a6174fbb90
commit
49941da089
1 changed files with 6 additions and 1 deletions
7
build.rs
7
build.rs
|
@ -22,7 +22,12 @@ fn main() -> Result<()> {
|
||||||
println!("cargo:rerun-if-changed=patches/");
|
println!("cargo:rerun-if-changed=patches/");
|
||||||
|
|
||||||
#[cfg(feature = "blog")]
|
#[cfg(feature = "blog")]
|
||||||
patch_crate::run().expect("Failed while patching");
|
{
|
||||||
|
println!("cargo:rerun-if-env-changed=SKIP_PATCH_CRATE");
|
||||||
|
if env::var("SKIP_PATCH_CRATE").is_err() {
|
||||||
|
patch_crate::run().expect("Failed while patching");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Generate openSSH host keys
|
// Generate openSSH host keys
|
||||||
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
|
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
|
||||||
|
|
Loading…
Add table
Reference in a new issue