Unverified Kaydet (Commit) f97c577c authored tarafından Ulysses Souza's avatar Ulysses Souza Kaydeden (comit) GitHub

Merge pull request #2298 from ijc/fix-docker-version-detection-script

scripts/version.py: Use regex grouping to extract the version
......@@ -62,13 +62,9 @@ def main():
for url in [base_url.format(cat) for cat in categories]:
res = requests.get(url)
content = res.text
versions = [
Version.parse(
v.strip('"').lstrip('docker-').rstrip('.tgz').rstrip('-x86_64')
) for v in re.findall(
r'"docker-[0-9]+\.[0-9]+\.[0-9]+-?.*tgz"', content
)
]
versions = [Version.parse(v) for v in re.findall(
r'"docker-([0-9]+\.[0-9]+\.[0-9]+)-?.*tgz"', content
)]
sorted_versions = sorted(
versions, reverse=True, key=operator.attrgetter('order')
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment