fix(build): rerun if resource or sidecar change (#3460)

This commit is contained in:
Lucas Fernandes Nogueira 2022-02-14 18:33:40 -03:00 committed by GitHub
parent 79bf061e01
commit afcc3ec501
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 7 deletions

View File

@ -0,0 +1,5 @@
---
"tauri-build": patch
---
Rerun if sidecar or resource change.

View File

@ -34,6 +34,7 @@ fn copy_file(from: impl AsRef<Path>, to: impl AsRef<Path>) -> Result<()> {
fn copy_binaries<'a>(binaries: ResourcePaths<'a>, target_triple: &str, path: &Path) -> Result<()> {
for src in binaries {
let src = src?;
println!("cargo:rerun-if-changed={}", src.display());
let dest = path.join(
src
.file_name()
@ -50,6 +51,7 @@ fn copy_binaries<'a>(binaries: ResourcePaths<'a>, target_triple: &str, path: &Pa
fn copy_resources(resources: ResourcePaths<'_>, path: &Path) -> Result<()> {
for src in resources {
let src = src?;
println!("cargo:rerun-if-changed={}", src.display());
let dest = path.join(resource_relpath(&src));
copy_file(&src, &dest)?;
}

View File

@ -2567,7 +2567,7 @@ dependencies = [
[[package]]
name = "tauri"
version = "1.0.0-rc.0"
version = "1.0.0-rc.2"
dependencies = [
"bincode",
"cfg_aliases",
@ -2610,7 +2610,7 @@ dependencies = [
[[package]]
name = "tauri-build"
version = "1.0.0-rc.0"
version = "1.0.0-rc.1"
dependencies = [
"anyhow",
"cargo_toml",
@ -2623,7 +2623,7 @@ dependencies = [
[[package]]
name = "tauri-codegen"
version = "1.0.0-rc.0"
version = "1.0.0-rc.1"
dependencies = [
"base64",
"blake3",
@ -2642,7 +2642,7 @@ dependencies = [
[[package]]
name = "tauri-macros"
version = "1.0.0-rc.0"
version = "1.0.0-rc.1"
dependencies = [
"heck 0.4.0",
"proc-macro2",
@ -2654,7 +2654,7 @@ dependencies = [
[[package]]
name = "tauri-runtime"
version = "0.3.0"
version = "0.3.1"
dependencies = [
"gtk",
"http",
@ -2671,7 +2671,7 @@ dependencies = [
[[package]]
name = "tauri-runtime-wry"
version = "0.3.0"
version = "0.3.1"
dependencies = [
"gtk",
"ico",
@ -2687,7 +2687,7 @@ dependencies = [
[[package]]
name = "tauri-utils"
version = "1.0.0-rc.0"
version = "1.0.0-rc.1"
dependencies = [
"ctor",
"glob",