svn commit: r350500 - head/sys/conf
Ed Maste
emaste at FreeBSD.org
Thu Aug 1 14:13:05 UTC 2019
Author: emaste
Date: Thu Aug 1 14:13:04 2019
New Revision: 350500
URL: https://svnweb.freebsd.org/changeset/base/350500
Log:
newvers: append commit count to uname version string
In a git world this provides a facsimile of a monotonically increasing
version number. This might be refined further, but this provides a
starting point for investigation.
Reviewed by: cem
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D20462
Modified:
head/sys/conf/newvers.sh
Modified: head/sys/conf/newvers.sh
==============================================================================
--- head/sys/conf/newvers.sh Thu Aug 1 14:02:59 2019 (r350499)
+++ head/sys/conf/newvers.sh Thu Aug 1 14:13:04 2019 (r350500)
@@ -291,6 +291,10 @@ if [ -n "$git_cmd" ] ; then
git=" ${git}"
fi
fi
+ git_cnt=$($git_cmd rev-list --count HEAD 2>/dev/null)
+ if [ -n "$git_cnt" ] ; then
+ git="${git}-c${git_cnt}"
+ fi
git_b=$($git_cmd rev-parse --abbrev-ref HEAD)
if [ -n "$git_b" ] ; then
git="${git}(${git_b})"
More information about the svn-src-head
mailing list