From 0f56d12a7e8869ba967514c64c994b8eaf97fcfc Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Thu, 24 Oct 2024 09:32:18 +0200 Subject: [PATCH] Replace BUILD_DATE with CARGO_PKG_VERSION to make builds reproducible. See https://reproducible-builds.org/ for why this is good. --- tui/Cargo.toml | 3 +-- tui/build.rs | 7 ------- tui/src/state.rs | 2 +- 3 files changed, 2 insertions(+), 10 deletions(-) delete mode 100644 tui/build.rs diff --git a/tui/Cargo.toml b/tui/Cargo.toml index 40d3c357..ea2d71f4 100644 --- a/tui/Cargo.toml +++ b/tui/Cargo.toml @@ -7,8 +7,7 @@ edition = "2021" license.workspace = true repository = "https://github.com/ChrisTitusTech/linutil/tree/main/tui" version.workspace = true -include = ["src/*.rs", "Cargo.toml", "build.rs", "cool_tips.txt", "../man/linutil.1"] -build = "build.rs" +include = ["src/*.rs", "Cargo.toml", "cool_tips.txt", "../man/linutil.1"] [features] default = ["tips"] diff --git a/tui/build.rs b/tui/build.rs deleted file mode 100644 index 121931c1..00000000 --- a/tui/build.rs +++ /dev/null @@ -1,7 +0,0 @@ -fn main() { - // Add current date as a variable to be displayed in the 'Linux Toolbox' text. - println!( - "cargo:rustc-env=BUILD_DATE={}", - chrono::Local::now().format("%Y-%m-%d") - ); -} diff --git a/tui/src/state.rs b/tui/src/state.rs index 4e398ee7..7807dd75 100644 --- a/tui/src/state.rs +++ b/tui/src/state.rs @@ -24,7 +24,7 @@ use temp_dir::TempDir; const MIN_WIDTH: u16 = 77; const MIN_HEIGHT: u16 = 19; -const TITLE: &str = concat!("Linux Toolbox - ", env!("BUILD_DATE")); +const TITLE: &str = concat!("Linux Toolbox - ", env!("CARGO_PKG_VERSION")); const ACTIONS_GUIDE: &str = "List of important tasks performed by commands' names: D - disk modifications (ex. partitioning) (privileged)