diff options
author | Helmut K. C. Tessarek <[email protected]> | 2023-07-04 18:08:52 -0400 |
---|---|---|
committer | Helmut K. C. Tessarek <[email protected]> | 2023-07-04 18:08:52 -0400 |
commit | 2b32b6f78c24c4e0f85b18818013feddd75c5bde (patch) | |
tree | e75d13d5a72093f6e955d45b102d3bc16554978c /build.rs | |
parent | a6cfdddfd8c2711fce850ea8e9038ad0a62f83a3 (diff) | |
download | vaultwarden-2b32b6f78c24c4e0f85b18818013feddd75c5bde.tar.gz vaultwarden-2b32b6f78c24c4e0f85b18818013feddd75c5bde.zip |
fix version when compiled at a specific commit
When a specific commit is checked out from the main branch, the vaultwarden
version is reported as `vaultwarden x.y.z-githash (HEAD)`.
This is a problem, because the admin interface reports this as a version from
a branch called HEAD, while in reality the commit was from the main branch.
Diffstat (limited to 'build.rs')
-rw-r--r-- | build.rs | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -72,7 +72,7 @@ fn version_from_git_info() -> Result<String, std::io::Error> { // Combined version if let Some(exact) = exact_tag { Ok(exact) - } else if &branch != "main" && &branch != "master" { + } else if &branch != "main" && &branch != "master" && &branch != "HEAD" { Ok(format!("{last_tag}-{rev_short} ({branch})")) } else { Ok(format!("{last_tag}-{rev_short}")) |