no gen_version if debug

This commit is contained in:
rustdesk 2023-01-07 12:31:12 +08:00
parent 605d0dd6c1
commit ee794d2e40

View File

@ -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() {