aboutsummaryrefslogtreecommitdiff
path: root/release/Makefile.inc1
diff options
context:
space:
mode:
Diffstat (limited to 'release/Makefile.inc1')
-rw-r--r--release/Makefile.inc16
1 files changed, 6 insertions, 0 deletions
diff --git a/release/Makefile.inc1 b/release/Makefile.inc1
index d9b4b6b393d3..64f7c6e049a4 100644
--- a/release/Makefile.inc1
+++ b/release/Makefile.inc1
@@ -21,11 +21,17 @@ GITBRANCH!= ${GIT_CMD} -C ${.CURDIR} rev-parse --abbrev-ref HEAD 2>/dev/null | s
GITREV!= ${GIT_CMD} -C ${.CURDIR} rev-parse --verify --short HEAD 2>/dev/null || true
. export GITREV
. endif
+. if !defined(GITCOUNT) || empty(GITCOUNT)
+GITCOUNT!= ${GIT_CMD} -C ${.CURDIR} rev-list --count HEAD 2>/dev/null || true
+. export GITCOUNT
+. endif
.else
GITBRANCH= nullbranch
GITREV= nullhash
+GITCOUNT= nullcount
. export GITBRANCH
. export GITREV
+. export GITCOUNT
.endif
# Set the build date, primarily for snapshot builds.