Commit 7d13c96e authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

properly parse release tags

parent 881eb7b0
Pipeline #14964 failed with stage
in 53 seconds
......@@ -369,9 +369,15 @@ class Project(Links, NamedModel, TimeStampedModel):
tags = self.tag_set.filter(name__startswith='v') # TODO: implement SQL ordering for semver
if tags.exists():
self.version = '%i.%i.%i' % sorted(
tuple(int(v) for v in[1:].split('.'))
for t in tags if not any(v in for v in ['-', 'rc']))[-1]
releases = []
for tag in tags:
release = tuple(int(v) for v in[1:].split('.'))
except ValueError:
if releases:
self.version = '%i.%i.%i' % sorted(releases)[-1]
robotpkg = self.robotpkg_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
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