Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Aug 2019 14:13:05 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r350500 - head/sys/conf
Message-ID:  <201908011413.x71ED5Ma029276@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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})"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908011413.x71ED5Ma029276>