mirror of
https://github.com/ankitects/anki.git
synced 2026-01-07 02:53:54 -05:00
fix(build): make proto/i18n's implicit outputs explicit
This commit is contained in:
parent
dda192f24c
commit
74b61d2a1b
1 changed files with 9 additions and 0 deletions
|
|
@ -335,6 +335,15 @@ pub fn write_file_if_changed(path: impl AsRef<Path>, contents: impl AsRef<[u8]>)
|
|||
.map(|existing| existing != contents)
|
||||
.unwrap_or(true)
|
||||
};
|
||||
|
||||
match std::env::var("CARGO_PKG_NAME") {
|
||||
Ok(pkg) if pkg == "anki_proto" || pkg == "anki_i18n" => {
|
||||
// at comptime for the proto /i18n crates, register implicit output as output
|
||||
println!("cargo:rerun-if-changed={}", path.to_str().unwrap());
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
if changed {
|
||||
write_file(path, contents)?;
|
||||
Ok(true)
|
||||
|
|
|
|||
Loading…
Reference in a new issue