Commit 2884afd5 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

Project.cmake updates cmake dependencies

parent d92a04bc
...@@ -199,6 +199,7 @@ class Project(Links, NamedModel, TimeStampedModel): ...@@ -199,6 +199,7 @@ class Project(Links, NamedModel, TimeStampedModel):
instance, bcreated = Branch.objects.get_or_create(name=branch, project=self, repo=repo) instance, bcreated = Branch.objects.get_or_create(name=branch, project=self, repo=repo)
if bcreated: if bcreated:
instance.update(pull=pull) instance.update(pull=pull)
self.cmake()
def main_branch(self): def main_branch(self):
heads = self.git().heads heads = self.git().heads
...@@ -219,6 +220,13 @@ class Project(Links, NamedModel, TimeStampedModel): ...@@ -219,6 +220,13 @@ class Project(Links, NamedModel, TimeStampedModel):
if search: if search:
self.__dict__[value] = search.groups()[0].strip(''' \r\n\t'"''') self.__dict__[value] = search.groups()[0].strip(''' \r\n\t'"''')
self.save() self.save()
for dependency in re.findall(r'ADD_[^ ]+_DEPENDENCY\s*\(["\']([^ ]+).*["\']\)', content, re.I):
project = Project.objects.filter(slug=dependency)
if project.exists():
dependency, created = Dependency.objects.get_or_create(project=self, library=dependency)
if dependency.cmake:
dependency.cmake = True
dependency.save()
def repos(self): def repos(self):
return self.repo_set.count() return self.repo_set.count()
......
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