make: Ensure git hash is 7 characters

Specify abbrev so the version string is the same across systems with
different values for core.abbrev.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
Tim Crawford
2023-01-11 09:41:42 -07:00
committed by Tim Crawford
parent f46360fb45
commit 28882975e3

View File

@ -13,7 +13,7 @@ all:
else
# Calculate version
DATE=$(shell git show --format="%cd" --date="format:%Y-%m-%d" --no-patch)
REV=$(shell git describe --always --dirty)
REV=$(shell git describe --abbrev=7 --always --dirty)
VERSION?=$(DATE)_$(REV)
# Set build directory