1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-02 08:42:48 +00:00

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
This commit is contained in:
Ed Maste 2019-08-01 14:13:04 +00:00
parent 41c31f1c06
commit ecb2bbc081
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=350500

View File

@ -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})"