Commit 881eb7b0 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

filter out more version names

parent 574c8591
Pipeline #14962 failed with stage
in 2 minutes and 43 seconds
...@@ -370,7 +370,8 @@ class Project(Links, NamedModel, TimeStampedModel): ...@@ -370,7 +370,8 @@ class Project(Links, NamedModel, TimeStampedModel):
tags = self.tag_set.filter(name__startswith='v') # TODO: implement SQL ordering for semver tags = self.tag_set.filter(name__startswith='v') # TODO: implement SQL ordering for semver
if tags.exists(): if tags.exists():
self.version = '%i.%i.%i' % sorted( self.version = '%i.%i.%i' % sorted(
tuple(int(v) for v in t.name[1:].split('.')) for t in tags if '-' not in t.name)[-1] tuple(int(v) for v in t.name[1:].split('.'))
for t in tags if not any(v in t.name for v in ['-', 'rc']))[-1]
robotpkg = self.robotpkg_set.order_by('-updated').first() robotpkg = self.robotpkg_set.order_by('-updated').first()
branch = self.branch_set.order_by('-updated').first() branch = self.branch_set.order_by('-updated').first()
branch_updated = branch is not None and branch.updated is not None branch_updated = branch is not None and branch.updated is not None
......
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