Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gepetto
dashboard
Commits
574c8591
Commit
574c8591
authored
Jun 15, 2021
by
Guilhem Saurel
Browse files
update version computation for M.10.p
parent
56558b64
Pipeline
#14954
failed with stage
in 2 minutes and 16 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rainboard/models.py
View file @
574c8591
...
...
@@ -367,9 +367,10 @@ class Project(Links, NamedModel, TimeStampedModel):
self
.
update_branches
(
main
=
only_main_branches
)
self
.
update_tags
()
self
.
update_repo
()
tag
=
self
.
tag_set
.
filter
(
name__startswith
=
'v'
).
last
()
# TODO: implement SQL ordering for semver
if
tag
is
not
None
:
self
.
version
=
tag
.
name
[
1
:]
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
t
.
name
[
1
:].
split
(
'.'
))
for
t
in
tags
if
'-'
not
in
t
.
name
)[
-
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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment