Skip to content

Commit 41e1c05

Browse files
authored
Merge pull request #2325 from docker/fix_versions_script
Fix versions.py to include release stage
2 parents 613d6aa + 20a5c06 commit 41e1c05

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/versions.py

100644100755
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ def parse(cls, version):
2626
edition = stage
2727
stage = None
2828
elif '-' in stage:
29-
edition, stage = stage.split('-')
30-
major, minor, patch = version.split('.', 3)
29+
edition, stage = stage.split('-', 1)
30+
major, minor, patch = version.split('.', 2)
3131
return cls(major, minor, patch, stage, edition)
3232

3333
@property
@@ -63,7 +63,7 @@ def main():
6363
res = requests.get(url)
6464
content = res.text
6565
versions = [Version.parse(v) for v in re.findall(
66-
r'"docker-([0-9]+\.[0-9]+\.[0-9]+)-?.*tgz"', content
66+
r'"docker-([0-9]+\.[0-9]+\.[0-9]+-?.*)\.tgz"', content
6767
)]
6868
sorted_versions = sorted(
6969
versions, reverse=True, key=operator.attrgetter('order')

0 commit comments

Comments
 (0)