[Asterisk-code-review] make version: Use only annotated tags to determine version (repotools[master])

George Joseph asteriskteam at digium.com
Tue Sep 5 12:18:05 CDT 2017


George Joseph has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.asterisk.org:29418/repotools refs/changes/08/6408/1

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: newchange
Gerrit-Change-Id: I411e38cebae5eded77fdd320ca622205499b18ad
Gerrit-Change-Number: 6408
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170905/fa0359eb/attachment.html>


More information about the asterisk-code-review mailing list