Merge pull request #131 from mempool/junderw/fix-dirty-docker-builds

Fix: Do not embed (dirty) in the docker built version
This commit is contained in:
Jonathan Underwood 2026-01-02 00:17:41 +09:00 committed by GitHub
commit d5dfbb13e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -34,7 +34,8 @@ fn main() {
// This includes untracked files
let dirty = cmd("git", &["status", "--short"]).expect("git command works");
let git_hash = if dirty.is_empty() {
// Ignore Dockerfile deletion as it is expected in Docker buildx builds
let git_hash = if dirty.is_empty() || dirty.trim() == "D Dockerfile" {
rev_parse
} else {
format!("{}(dirty)", rev_parse.trim())