mirror of
https://github.com/docker/compose.git
synced 2025-07-20 20:24:30 +02:00
Merge pull request #6248 from docker/test-betas-and-tps
Re-enable testing of TP and beta releases
This commit is contained in:
commit
e3e93d40a8
@ -36,6 +36,8 @@ import requests
|
|||||||
|
|
||||||
GITHUB_API = 'https://api.github.com/repos'
|
GITHUB_API = 'https://api.github.com/repos'
|
||||||
|
|
||||||
|
STAGES = ['tp', 'beta', 'rc']
|
||||||
|
|
||||||
|
|
||||||
class Version(namedtuple('_Version', 'major minor patch stage edition')):
|
class Version(namedtuple('_Version', 'major minor patch stage edition')):
|
||||||
|
|
||||||
@ -45,7 +47,7 @@ class Version(namedtuple('_Version', 'major minor patch stage edition')):
|
|||||||
version = version.lstrip('v')
|
version = version.lstrip('v')
|
||||||
version, _, stage = version.partition('-')
|
version, _, stage = version.partition('-')
|
||||||
if stage:
|
if stage:
|
||||||
if not any(marker in stage for marker in ['rc', 'tp', 'beta']):
|
if not any(marker in stage for marker in STAGES):
|
||||||
edition = stage
|
edition = stage
|
||||||
stage = None
|
stage = None
|
||||||
elif '-' in stage:
|
elif '-' in stage:
|
||||||
@ -62,8 +64,16 @@ class Version(namedtuple('_Version', 'major minor patch stage edition')):
|
|||||||
"""Return a representation that allows this object to be sorted
|
"""Return a representation that allows this object to be sorted
|
||||||
correctly with the default comparator.
|
correctly with the default comparator.
|
||||||
"""
|
"""
|
||||||
# rc releases should appear before official releases
|
# non-GA releases should appear before GA releases
|
||||||
stage = (0, self.stage) if self.stage else (1, )
|
# Order: tp -> beta -> rc -> GA
|
||||||
|
if self.stage:
|
||||||
|
for st in STAGES:
|
||||||
|
if st in self.stage:
|
||||||
|
stage = (STAGES.index(st), self.stage)
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
stage = (len(STAGES),)
|
||||||
|
|
||||||
return (int(self.major), int(self.minor), int(self.patch)) + stage
|
return (int(self.major), int(self.minor), int(self.patch)) + stage
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
@ -124,9 +134,6 @@ def get_versions(tags):
|
|||||||
v = Version.parse(tag['name'])
|
v = Version.parse(tag['name'])
|
||||||
if v in BLACKLIST:
|
if v in BLACKLIST:
|
||||||
continue
|
continue
|
||||||
# FIXME: Temporary. Remove once these versions are built on dockerswarm/dind
|
|
||||||
if v.stage and 'rc' not in v.stage:
|
|
||||||
continue
|
|
||||||
yield v
|
yield v
|
||||||
except ValueError:
|
except ValueError:
|
||||||
print("Skipping invalid tag: {name}".format(**tag), file=sys.stderr)
|
print("Skipping invalid tag: {name}".format(**tag), file=sys.stderr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user