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):
instance, bcreated = Branch.objects.get_or_create(name=branch, project=self, repo=repo)
if bcreated:
def main_branch(self):
heads = self.git().heads
......@@ -219,6 +220,13 @@ class Project(Links, NamedModel, TimeStampedModel):
if search:
self.__dict__[value] = search.groups()[0].strip(''' \r\n\t'"''')
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
def repos(self):
return self.repo_set.count()
Supports Markdown
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