aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2016-02-10 20:16:34 +0100
committerGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2016-02-10 20:16:34 +0100
commit0cd9cbcf60350854d5510d4cfa5229d622882d63 (patch)
treefd0f52678e70442b7865b60087800d589d16fb08 /tools
parenta8ba0c56158eca15cca58725a49a0ceb7e68e795 (diff)
Fixing the absence of 'tag' in the version.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/buildgen/plugins/expand_version.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/buildgen/plugins/expand_version.py b/tools/buildgen/plugins/expand_version.py
index a103618c01..b55e1b15ff 100755
--- a/tools/buildgen/plugins/expand_version.py
+++ b/tools/buildgen/plugins/expand_version.py
@@ -51,6 +51,7 @@ LANGUAGES = [
class Version:
def __init__(self, s):
+ self.tag = None
if '-' in s:
s, self.tag = s.split('-')
self.major, self.minor, self.patch = [int(x) for x in s.split('.')]
@@ -78,7 +79,10 @@ class Version:
def ruby(self):
"""Version string in Ruby style"""
- return '%d.%d.%d.%s' % (self.major, self.minor, self.patch, self.tag)
+ if self.tag:
+ return '%d.%d.%d.%s' % (self.major, self.minor, self.patch, self.tag)
+ else:
+ return '%d.%d.%d' % (self.major, self.minor, self.patch)
def mako_plugin(dictionary):
"""Expand version numbers: