[asterisk-commits] make version: Use only annotated tags to determine version (repotools[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 6 11:36:38 CDT 2017


George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/6408 )

Change subject: make_version: Use only annotated tags to determine version
......................................................................

make_version: Use only annotated tags to determine version

They have timestamps so if there's more than 1 tag pointing to a
commit, we always get the latest.

Change-Id: I411e38cebae5eded77fdd320ca622205499b18ad
---
M build_tools/make_version
1 file changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved; Approved for Submit



diff --git a/build_tools/make_version b/build_tools/make_version
index f351871..e0427bf 100755
--- a/build_tools/make_version
+++ b/build_tools/make_version
@@ -27,10 +27,12 @@
     git update-index --refresh >/dev/null 2>&1 || :
 
     MODIFIED=""
-    VERSION=`${GIT} describe --tags --dirty 2> /dev/null`
+    ${GIT} config --local --replace-all versionsort.prereleaseSuffix -rc
+    
+    VERSION=`${GIT} describe --dirty 2> /dev/null`
     if [ $? -eq 0 ]; then
         if [ "${VERSION:(-6)}" = "-dirty" ]; then
-            VERSION=`${GIT} describe --tags --long --dirty=M 2> /dev/null`
+            VERSION=`${GIT} describe --long --dirty=M 2> /dev/null`
             VERSION="GIT-${VERSION}"
         elif [ -z "`${GIT} tag --contains HEAD`" ]; then
             VERSION="GIT-${VERSION}"

-- 
To view, visit https://gerrit.asterisk.org/6408
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: repotools
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I411e38cebae5eded77fdd320ca622205499b18ad
Gerrit-Change-Number: 6408
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170906/77f4ea8c/attachment-0001.html>


More information about the asterisk-commits mailing list