diff options
author | Mathijs van Veluw <[email protected]> | 2023-12-09 23:04:33 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2023-12-09 23:04:33 +0100 |
commit | 3246251f295fd16dba21ec9d32afbbb104bd9c8e (patch) | |
tree | b74920222f24255d492a8547d0c5667a6b13d5e3 /build.rs | |
parent | 8ab200224e9ef0879ccd35080365118b08c43b02 (diff) | |
download | vaultwarden-3246251f295fd16dba21ec9d32afbbb104bd9c8e.tar.gz vaultwarden-3246251f295fd16dba21ec9d32afbbb104bd9c8e.zip |
Fix the version string (#4153)
For some reason still not known, the `.git` directory was not copied
into the container. I think buildkit (buildx) did this by default before, and
stopped this with newer versions.
This PR fixes this by also touching `build.rs` besides `src/main.rs`.
This PR also updates Rust to v1.74.1 and some crates, including the
latest version of Alpine 3.19.
Fixes #4150
Diffstat (limited to 'build.rs')
-rw-r--r-- | build.rs | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -17,6 +17,13 @@ fn main() { "You need to enable one DB backend. To build with previous defaults do: cargo build --features sqlite" ); + // Rerun when these paths are changed. + // Someone could have checked-out a tag or specific commit, but no other files changed. + println!("cargo:rerun-if-changed=.git"); + println!("cargo:rerun-if-changed=.git/HEAD"); + println!("cargo:rerun-if-changed=.git/index"); + println!("cargo:rerun-if-changed=.git/refs/tags"); + #[cfg(all(not(debug_assertions), feature = "query_logger"))] compile_error!("Query Logging is only allowed during development, it is not intended for production usage!"); @@ -48,11 +55,6 @@ fn run(args: &[&str]) -> Result<String, std::io::Error> { /// - env!("GIT_REV") /// - env!("VW_VERSION") fn version_from_git_info() -> Result<String, std::io::Error> { - // Rerun when these paths are changed. - // Someone could have checked-out a tag or specific commit, but no other files changed. - println!("cargo:rerun-if-changed=.git/HEAD"); - println!("cargo:rerun-if-changed=.git/refs/tags/"); - // The exact tag for the current commit, can be empty when // the current commit doesn't have an associated tag let exact_tag = run(&["git", "describe", "--abbrev=0", "--tags", "--exact-match"]).ok(); |