Match only tags that start with v when looking for versions.
authorcah <cah@ableton.com>
Fri, 12 Nov 2021 14:06:22 +0000 (15:06 +0100)
committercah <cah@ableton.com>
Fri, 12 Nov 2021 14:06:22 +0000 (15:06 +0100)
cdist

diff --git a/cdist b/cdist
index 89aa0fa547143602efd212b751c18fcce6246b30..21a9ab594572f8d234000e13502a1be095f275c4 100755 (executable)
--- a/cdist
+++ b/cdist
@@ -1045,7 +1045,7 @@ class Tree(object):
                     self.version = Version(v)
                 except:
                     try:
-                        tag = command_and_read('git -C %s describe --tags' % proj)[0][1:]
+                        tag = command_and_read('git -C %s describe --match v* --tags' % proj)[0][1:]
                         self.version = Version.from_git_tag(tag)
                     except:
                         # We'll leave version as None if we can't read it; maybe this is a bad idea