diff --git a/Makefile b/Makefile index 8c21e145..f4a9fae3 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,8 @@ BUILDTAGS ?= selinux seccomp $(shell hack/btrfs_tag.sh) $(shell hack/libdm_tag.s BASHINSTALLDIR=${PREFIX}/share/bash-completion/completions SELINUXOPT ?= $(shell test -x /usr/sbin/selinuxenabled && selinuxenabled && echo -Z) -GIT_COMMIT := $(shell git rev-parse --short HEAD) +COMMIT_NO := $(shell git rev-parse HEAD 2> /dev/null || true) +GIT_COMMIT := $(if $(shell git status --porcelain --untracked-files=no),"${COMMIT_NO}-dirty","${COMMIT_NO}") BUILD_INFO := $(shell date +%s) VERSION := ${shell cat ./VERSION}