Explorar o código

Rerun build only if proto file chaged (#127)

%!s(int64=2) %!d(string=hai) anos
pai
achega
bd025d85cc
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      data_server/build.rs

+ 6 - 1
data_server/build.rs

@@ -1,4 +1,9 @@
 fn main() -> Result<(), Box<dyn std::error::Error>> {
-    tonic_build::compile_protos("../fish_speech/datasets/protos/text-data.proto")?;
+    const TEXT_DATA_PROTO: &str = "../fish_speech/datasets/protos/text-data.proto";
+
+    println!("cargo::rerun-if-changed=build.rs");
+    println!("cargo::rerun-if-changed={}", TEXT_DATA_PROTO);
+
+    tonic_build::compile_protos(TEXT_DATA_PROTO)?;
     Ok(())
 }