From d29bcb8e4c551978bd86ed7d9c1c20ad32541494 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Wed, 16 Jan 2019 17:07:02 +0100 Subject: [PATCH] Make version correct on shallow copies Closes #7378 --- builder-support/gen-version | 1 + 1 file changed, 1 insertion(+) diff --git a/builder-support/gen-version b/builder-support/gen-version index 4dc3f09f86..a3eb581319 100755 --- a/builder-support/gen-version +++ b/builder-support/gen-version @@ -44,6 +44,7 @@ if [ ! -z "$(git rev-parse --abbrev-ref HEAD 2> /dev/null)" ]; then # This _should_ be ok for forever is we stick to X.Y.Z for version numbers LAST_TAG=0.0 COMMITS_SINCE_TAG="$(git rev-list --count 12c868770afc20b6cc0da439d881105151d557dd..HEAD 2> /dev/null).0" + [ "${COMMITS_SINCE_TAG}" = ".0" ] && COMMITS_SINCE_TAG=0.0 GIT_HASH="$(git rev-parse HEAD | cut -c1-10 2> /dev/null)" fi -- 2.47.2