-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9281a6c
commit 6e195a4
Showing
3 changed files
with
235 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from urllib import request | ||
import re | ||
|
||
def get_versions(os, channel): | ||
data = request.urlopen('https://download.docker.com/' + os + '/static/' + channel + '/x86_64/').read().decode('utf-8') | ||
return re.findall(r'docker-([0-9\.]+)\.tgz<\/a>', data) | ||
|
||
stable_versions = get_versions('linux', 'stable') | ||
edge_versions = get_versions('linux', 'edge') | ||
|
||
releases = [] | ||
for version in edge_versions: | ||
releases.append({ | ||
'version': version.replace('.03.', '.3.').replace('.06.', '.6.').replace('.09.', '.9.'), | ||
'version-original': version, | ||
'stability': 'stable' if version in stable_versions else 'testing', | ||
'channel': 'stable' if version in stable_versions else 'edge' | ||
}) |
Oops, something went wrong.