aboutsummaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
authorrustdesk <[email protected]>2023-01-07 12:31:12 +0800
committerrustdesk <[email protected]>2023-01-07 12:31:12 +0800
commitee794d2e40bedf504a6351912522083d42a54122 (patch)
treef956e76a00e2733c6a9d53d5437de970f2835734 /libs
parent605d0dd6c1173fc18793453709dd4505b721c16a (diff)
downloadrustdesk-server-ee794d2e40bedf504a6351912522083d42a54122.tar.gz
rustdesk-server-ee794d2e40bedf504a6351912522083d42a54122.zip
no gen_version if debug
Diffstat (limited to 'libs')
-rw-r--r--libs/hbb_common/src/lib.rs4
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() {