Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
Update for new build naming
Browse files Browse the repository at this point in the history
  • Loading branch information
remyroy committed May 14, 2021
1 parent 9982cdc commit 546fe9b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cddagl/ui/views/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1466,10 +1466,10 @@ def find_build_finished(self):
r'cdda-windows-' +
re.escape(new_asset_graphics) + r'-' +
re.escape(new_asset_platform) + r'-' +
r'b?(?P<build>\d+)\.zip'
r'b?(?P<build>[0-9\-]+)\.zip'
)

build_regex = re.compile(r'[Bb]uild #(?P<build>\d+)')
build_regex = re.compile(r'[Bb]uild #?(?P<build>[0-9\-]+)')

if any(x not in release for x in ('name', 'created_at')):
return
Expand Down Expand Up @@ -1515,7 +1515,7 @@ def find_build_finished(self):
return

if len(builds) > 0:
builds.sort(key=lambda x: (x['date'], int(x['number'])), reverse=True)
builds.sort(key=lambda x: (x['date'], x['number']), reverse=True)
self.builds = builds

self.builds_combo.clear()
Expand Down Expand Up @@ -3026,10 +3026,10 @@ def lb_http_finished(self):
r'cdda-windows-' +
re.escape(new_asset_graphics) + r'-' +
re.escape(new_asset_platform) + r'-' +
r'b?(?P<build>\d+)\.zip'
r'b?(?P<build>[0-9\-]+)\.zip'
)

build_regex = re.compile(r'[Bb]uild #(?P<build>\d+)')
build_regex = re.compile(r'[Bb]uild #?(?P<build>[0-9\-]+)')

for release in releases:
if any(x not in release for x in ('name', 'created_at')):
Expand Down Expand Up @@ -3059,7 +3059,7 @@ def lb_http_finished(self):
builds.append(build)

if len(builds) > 0:
builds.sort(key=lambda x: (x['date'], int(x['number'])), reverse=True)
builds.sort(key=lambda x: (x['date'], x['number']), reverse=True)
self.builds = builds

self.builds_combo.clear()
Expand Down Expand Up @@ -3175,7 +3175,7 @@ def refresh_builds(self):
}
builds.append(build)

builds.sort(key=lambda x: (int(x['number']), x['date']), reverse=True)
builds.sort(key=lambda x: (x['date'], x['number']), reverse=True)
self.builds = builds

self.builds_combo.clear()
Expand Down

0 comments on commit 546fe9b

Please sign in to comment.