mk: compute version deterministically

Ensure abbreviated commit id of fixed length in computed version
regardless of user's configuration.  Choose length 12 as safe value.

Link: https://github.com/git/git/commit/dce96489162b
Signed-off-by: Jose Lombera <jose@lombera.dev>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
Jose Lombera 2022-07-14 16:45:19 -05:00 committed by Robin Jarry
parent 04097e8743
commit f5e886406b

View file

@ -2,7 +2,7 @@
.SUFFIXES: .SUFFIXES:
.SUFFIXES: .1 .5 .7 .1.scd .5.scd .7.scd .SUFFIXES: .1 .5 .7 .1.scd .5.scd .7.scd
VERSION!=git describe --long --tags --dirty 2>/dev/null || echo 0.11.0 VERSION!=git describe --long --abbrev=12 --tags --dirty 2>/dev/null || echo 0.11.0
VPATH=doc VPATH=doc
PREFIX?=/usr/local PREFIX?=/usr/local
BINDIR?=$(PREFIX)/bin BINDIR?=$(PREFIX)/bin