summaryrefslogtreecommitdiffstats
path: root/sys/conf/newvers.sh
diff options
context:
space:
mode:
authorrpaulo <rpaulo@FreeBSD.org>2013-10-03 01:53:17 +0000
committerrpaulo <rpaulo@FreeBSD.org>2013-10-03 01:53:17 +0000
commit0755e798aea32a683b6ee74dfd2b6ec32d4f8954 (patch)
treec553903a9ce79488a0ac2417ebf8e4557b934ea5 /sys/conf/newvers.sh
parent3839ce408034f4ff1b522b67c94259e628fccfd0 (diff)
downloadFreeBSD-src-0755e798aea32a683b6ee74dfd2b6ec32d4f8954.zip
FreeBSD-src-0755e798aea32a683b6ee74dfd2b6ec32d4f8954.tar.gz
Append the Git branch to the version string.
Approved by: re (gjb)
Diffstat (limited to 'sys/conf/newvers.sh')
-rw-r--r--sys/conf/newvers.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index d84e034..263eb4c 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -159,6 +159,10 @@ if [ -n "$git_cmd" ] ; then
git=" ${git}"
fi
fi
+ git_b=`$git_cmd rev-parse --abbrev-ref HEAD`
+ if [ -n "$git_b" ] ; then
+ git="${git}(${git_b})"
+ fi
if $git_cmd --work-tree=${SYSDIR}/.. diff-index \
--name-only HEAD | read dummy; then
git="${git}-dirty"
OpenPOWER on IntegriCloud