From 24bf2826cc6eae9c5d6fcdc16dea41b07b8ad9e1 Mon Sep 17 00:00:00 2001 From: cloudhead Date: Tue, 26 Mar 2024 10:07:11 +0100 Subject: [PATCH] Update build script for 1.77 Remove the `rerun-if-changed` since it was causing problems with test speed. By default, it will re-run if any file changes, which should be fine. --- build.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/build.rs b/build.rs index c609a7e0..620232c6 100644 --- a/build.rs +++ b/build.rs @@ -1,8 +1,6 @@ use std::env; use std::process::Command; -// TODO: Update to `cargo::` syntax after rust 1.77. - fn main() -> Result<(), Box> { // Set a build-time `GIT_HEAD` env var which includes the commit id; // such that we can tell which code is running. @@ -88,10 +86,9 @@ fn main() -> Result<(), Box> { }) .unwrap_or(0.to_string()); - println!("cargo:rustc-env=RADICLE_VERSION={version}"); - println!("cargo:rustc-env=GIT_COMMIT_TIME={commit_time}"); - println!("cargo:rustc-env=GIT_HEAD={hash}"); - println!("cargo:rustc-rerun-if-changed=.git/HEAD"); + println!("cargo::rustc-env=RADICLE_VERSION={version}"); + println!("cargo::rustc-env=GIT_COMMIT_TIME={commit_time}"); + println!("cargo::rustc-env=GIT_HEAD={hash}"); Ok(()) }