Skip to content
GitLab
Menu
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
e5562db2
Commit
e5562db2
authored
Jul 11, 2018
by
Guilhem Saurel
Browse files
Project.cmake: dont stop on wrong stuff
parent
52a350cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
rainboard/models.py
View file @
e5562db2
...
...
@@ -6,6 +6,7 @@ from subprocess import check_output
from
django.conf
import
settings
from
django.db
import
models
from
django.db.models.functions
import
Length
from
django.db.utils
import
DataError
from
django.template.loader
import
get_template
from
django.utils.dateparse
import
parse_datetime
from
django.utils.safestring
import
mark_safe
...
...
@@ -217,8 +218,11 @@ class Project(Links, NamedModel, TimeStampedModel):
for
key
,
value
in
CMAKE_FIELDS
.
items
():
search
=
re
.
search
(
f
'set\s*\(\s*project_
{
key
}
\s+([^)]+)*\)'
,
content
,
re
.
I
)
if
search
:
self
.
__dict__
[
value
]
=
search
.
groups
()[
0
].
strip
(
'''
\r\n\t
'"'''
)
self
.
save
()
try
:
self
.
__dict__
[
value
]
=
search
.
groups
()[
0
].
strip
(
'''
\r\n\t
'"'''
)
self
.
save
()
except
DataError
:
pass
for
dependency
in
re
.
findall
(
r
'ADD_[^ ]+_DEPENDENCY\s*\(["\']([^ ]+).*["\']\)'
,
content
,
re
.
I
):
project
=
Project
.
objects
.
filter
(
slug
=
dependency
)
if
project
.
exists
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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