From 239e2cbaed0d9ec0fa8a9f75b5a787f5a744147a Mon Sep 17 00:00:00 2001 From: Tim Crawford Date: Tue, 18 Jan 2022 09:55:52 -0700 Subject: [PATCH] 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 --- scripts/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build.sh b/scripts/build.sh index 8abb0a8..1bb1d2b 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -20,7 +20,7 @@ fi MODEL_DIR="$(realpath "models/${MODEL}")" 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}" echo "Building '${VERSION}' for '${MODEL}'"