Skip to content
Snippets Groups Projects
Commit 10a4cc74 authored by Craig Tiller's avatar Craig Tiller
Browse files

Merge pull request #5183 from nicolasnoble/fixing-no-tag

Fixing the absence of 'tag' in the version.
parents 02459eda 0cd9cbcf
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment