Skip to content

Commit afcc3ec

Browse files
authored
fix(build): rerun if resource or sidecar change (#3460)
1 parent 79bf061 commit afcc3ec

3 files changed

Lines changed: 14 additions & 7 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri-build": patch
3+
---
4+
5+
Rerun if sidecar or resource change.

core/tauri-build/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ fn copy_file(from: impl AsRef<Path>, to: impl AsRef<Path>) -> Result<()> {
3434
fn copy_binaries<'a>(binaries: ResourcePaths<'a>, target_triple: &str, path: &Path) -> Result<()> {
3535
for src in binaries {
3636
let src = src?;
37+
println!("cargo:rerun-if-changed={}", src.display());
3738
let dest = path.join(
3839
src
3940
.file_name()
@@ -50,6 +51,7 @@ fn copy_binaries<'a>(binaries: ResourcePaths<'a>, target_triple: &str, path: &Pa
5051
fn copy_resources(resources: ResourcePaths<'_>, path: &Path) -> Result<()> {
5152
for src in resources {
5253
let src = src?;
54+
println!("cargo:rerun-if-changed={}", src.display());
5355
let dest = path.join(resource_relpath(&src));
5456
copy_file(&src, &dest)?;
5557
}

examples/sidecar/src-tauri/Cargo.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)