Commit 335dc600 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

parsing CMakeLists to find dependencies: what we are looking for always ends with a )

parent 4a215d17
Pipeline #1048 passed with stages
in 1 minute and 2 seconds
......@@ -225,7 +225,7 @@ class Project(Links, NamedModel, TimeStampedModel):
self.save()
except DataError:
self.__dict__[value] = old
for dependency in re.findall(r'ADD_[A-Z]+_DEPENDENCY\s*\(["\']?([^ "\']+).*["\']?\)', content, re.I):
for dependency in re.findall(r'ADD_[A-Z]+_DEPENDENCY\s*\(["\']?([^ "\')]+).*["\']?\)', content, re.I):
project = Project.objects.filter(models.Q(slug=dependency) | models.Q(slug=dependency.replace('_', '-')))
if project.exists():
dependency, _ = Dependency.objects.get_or_create(project=self, library=project.first())
......
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