修改prost_build不在release模式执行
Some checks failed
build / build-rust (push) Failing after 5m41s

This commit is contained in:
soul-walker 2024-09-15 11:13:08 +08:00
parent 8b59751038
commit 83d4020d61

View File

@ -2,6 +2,15 @@ use std::process::Command;
use prost_build::Config;
fn main() {
// 获取构建的profile
let profile = std::env::var("PROFILE").unwrap();
println!("profile: {}", profile);
// 如果是release模式不重新生成
if profile == "release" {
return;
}
// println!("cargo:rerun-if-changed=build.rs");
#[cfg(target_os = "windows")]
{