Browse Source

run gen_version no matter debug or release

rustdesk 3 years ago
parent
commit
fe3b42809a
3 changed files with 2 additions and 5 deletions
  1. 1 1
      libs/hbb_common/build.rs
  2. 0 3
      libs/hbb_common/src/lib.rs
  3. 1 1
      src/version.rs

+ 1 - 1
libs/hbb_common/build.rs

@@ -2,7 +2,7 @@ fn main() {
2 2
     let out_dir = format!("{}/protos", std::env::var("OUT_DIR").unwrap());
3 3
 
4 4
     std::fs::create_dir_all(&out_dir).unwrap();
5
-    
5
+
6 6
     protobuf_codegen::Codegen::new()
7 7
         .pure()
8 8
         .out_dir(out_dir)

+ 0 - 3
libs/hbb_common/src/lib.rs

@@ -197,9 +197,6 @@ pub fn get_version_from_url(url: &str) -> String {
197 197
 }
198 198
 
199 199
 pub fn gen_version() {
200
-    if Ok("release".to_owned()) != std::env::var("PROFILE") {
201
-        return;
202
-    }
203 200
     println!("cargo:rerun-if-changed=Cargo.toml");
204 201
     use std::io::prelude::*;
205 202
     let mut file = File::create("./src/version.rs").unwrap();

+ 1 - 1
src/version.rs

@@ -1,3 +1,3 @@
1 1
 pub const VERSION: &str = "1.1.7";
2 2
 #[allow(dead_code)]
3
-pub const BUILD_DATE: &str = "2023-01-10 22:43";
3
+pub const BUILD_DATE: &str = "2023-02-01 10:45";