diff options
-rw-r--r-- | libs/hbb_common/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/hbb_common/src/lib.rs b/libs/hbb_common/src/lib.rs index 8bdbb87..6270850 100644 --- a/libs/hbb_common/src/lib.rs +++ b/libs/hbb_common/src/lib.rs @@ -180,6 +180,10 @@ pub fn get_version_from_url(url: &str) -> String { } pub fn gen_version() { + if Ok("release".to_owned()) != std::env::var("PROFILE") { + return; + } + println!("cargo:rerun-if-changed=Cargo.toml"); use std::io::prelude::*; let mut file = File::create("./src/version.rs").unwrap(); for line in read_lines("Cargo.toml").unwrap().flatten() { |