The branch stable/11 has been updated by lwhsu:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=98dfc7de6176972d7b6b7dce9b18439c0c9edabe

commit 98dfc7de6176972d7b6b7dce9b18439c0c9edabe
Author:     Ed Maste <[email protected]>
AuthorDate: 2019-08-01 14:13:04 +0000
Commit:     Li-Wen Hsu <[email protected]>
CommitDate: 2021-01-12 08:22:30 +0000

    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
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D20462
    
    The "Relnotes" flag in the commit message is removed in cherry-pick as
    git repo doesn't affect the stable/11 and stable/12 release.
    
    (cherry picked from commit ecb2bbc081ae906956f4718ec946b9e4fcea241f)
---
 sys/conf/newvers.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 661bbc3978e6..593f14ef4145 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -233,6 +233,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})"
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to