mirror of https://github.com/docker/compose.git
Update versions.py script to support new engine versioning schema
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
aa8fb8f708
commit
c2553ac777
|
@ -44,7 +44,7 @@ class Version(namedtuple('_Version', 'major minor patch rc')):
|
|||
version = version.lstrip('v')
|
||||
version, _, rc = version.partition('-')
|
||||
major, minor, patch = version.split('.', 3)
|
||||
return cls(int(major), int(minor), int(patch), rc)
|
||||
return cls(major, minor, patch, rc)
|
||||
|
||||
@property
|
||||
def major_minor(self):
|
||||
|
@ -57,7 +57,7 @@ class Version(namedtuple('_Version', 'major minor patch rc')):
|
|||
"""
|
||||
# rc releases should appear before official releases
|
||||
rc = (0, self.rc) if self.rc else (1, )
|
||||
return (self.major, self.minor, self.patch) + rc
|
||||
return (int(self.major), int(self.minor), int(self.patch)) + rc
|
||||
|
||||
def __str__(self):
|
||||
rc = '-{}'.format(self.rc) if self.rc else ''
|
||||
|
|
Loading…
Reference in New Issue