Skip to content

Commit

Permalink
Merge pull request #1042 from NordSecurity/tk-no-needless-rebuilds-in…
Browse files Browse the repository at this point in the history
…-nat-lab

Make sure that build scripts use rerun-if-changed in a correct way
  • Loading branch information
tomaszklak authored Dec 20, 2024
2 parents 0d420fc + 4a4d8ca commit 1723061
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Empty file.
6 changes: 3 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ fn check_git_hooks() -> Result<()> {
}

fn verify_llt_secrets() {
println!("cargo:rerun-if-changed=./crates");
println!("cargo:rerun-if-changed=./src");

if !env::var("GITLAB_CI")
.or(env::var("GITHUB_ACTIONS"))
.is_ok_and(|value| value == "true")
Expand All @@ -85,6 +82,9 @@ fn verify_llt_secrets() {
return;
}

println!("cargo:rerun-if-changed=./crates");
println!("cargo:rerun-if-changed=./src");

#[allow(clippy::panic)]
match check_git_secrets().and_then(|_| check_git_hooks()) {
Ok(_) => {}
Expand Down
1 change: 1 addition & 0 deletions crates/telio-lana/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use anyhow::Result;
#[allow(unwrap_check)]
fn main() -> Result<()> {
println!("cargo:rerun-if-changed=build.rs");
let target_os = std::env::var("CARGO_CFG_TARGET_OS")?;
if target_os == "windows" {
if let Some(path) = std::option_env!("OUT_DIR") {
Expand Down

0 comments on commit 1723061

Please sign in to comment.