summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2020-12-16 18:40:49 +0000
committerGlen Barber <gjb@FreeBSD.org>2020-12-16 18:40:49 +0000
commitd3df64ad991881a50dd2b4e58c16e69958cf0f3b (patch)
treeb2543b910c12955a2231d2dfc2203e4d103930b0
parent08241fedc4fa2fe35ee068cdcab6a021c275ecbb (diff)
downloadsrc-test2-d3df64ad991881a50dd2b4e58c16e69958cf0f3b.tar.gz
src-test2-d3df64ad991881a50dd2b4e58c16e69958cf0f3b.zip
Append the branch commit count to _SNAP_SUFFIX for development
snapshot builds. Sponsored by: Rubicon Communications, LLC (netgate.com)
Notes
Notes: svn path=/head/; revision=368704
-rw-r--r--release/Makefile.inc16
-rw-r--r--release/Makefile.mirrors2
2 files changed, 7 insertions, 1 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.
diff --git a/release/Makefile.mirrors b/release/Makefile.mirrors
index 6e79bc005990..522844a6b057 100644
--- a/release/Makefile.mirrors
+++ b/release/Makefile.mirrors
@@ -33,7 +33,7 @@ TLD?= ${FTPDIR}/snapshots
.if !defined(BUILDDATE) || empty(BUILDDATE)
BUILDDATE!= date +%Y%m%d
.endif
-_SNAP_SUFFIX:= ${BUILDDATE}-${GITREV}
+_SNAP_SUFFIX:= ${BUILDDATE}-${GITREV}-${GITCOUNT}
.else
# release
SNAPSHOT=