build.sh: Set git-describe length
Specify `abbrev` to ensure the length of the commit hash is always the same, in case `core.abbrev` is set or the default changes. Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
committed by
Jeremy Soller
parent
417e5898da
commit
239e2cbaed
@@ -20,7 +20,7 @@ fi
|
|||||||
MODEL_DIR="$(realpath "models/${MODEL}")"
|
MODEL_DIR="$(realpath "models/${MODEL}")"
|
||||||
|
|
||||||
DATE="$(git show --format="%cd" --date="format:%Y-%m-%d" --no-patch)"
|
DATE="$(git show --format="%cd" --date="format:%Y-%m-%d" --no-patch)"
|
||||||
REV="$(git describe --always --dirty)"
|
REV="$(git describe --always --dirty --abbrev=7)"
|
||||||
VERSION="${DATE}_${REV}"
|
VERSION="${DATE}_${REV}"
|
||||||
echo "Building '${VERSION}' for '${MODEL}'"
|
echo "Building '${VERSION}' for '${MODEL}'"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user