Append the branch commit count to _SNAP_SUFFIX for development

snapshot builds.

Sponsored by:	Rubicon Communications, LLC (netgate.com)
This commit is contained in:
Glen Barber 2020-12-16 18:40:49 +00:00
parent 08241fedc4
commit d3df64ad99
2 changed files with 7 additions and 1 deletions

View File

@ -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.

View File

@ -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=