Skip to content

Commit

Permalink
Rerun build only if proto file chaged (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethe authored Apr 19, 2024
1 parent 053169e commit bd025d8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion data_server/build.rs
Original file line number Diff line number Diff line change
@@ -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(())
}

0 comments on commit bd025d8

Please sign in to comment.