Commit 0a4b1952 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

only_main_branches & longer pkgversion

parent 3b4b8ec2
Pipeline #2004 passed with stages
in 53 seconds
......@@ -35,7 +35,7 @@ class Command(BaseCommand):
log(f'\nUpdating all projects\n')
for project in Project.objects.all():
log(f' {project}')
project.update()
project.update(only_main_branches=False)
log(f'\nUpdating Robotpkg\n')
for robotpkg in Robotpkg.objects.all():
......
# Generated by Django 2.1.3 on 2018-12-17 14:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rainboard', '0024_project_cmake_name'),
]
operations = [
migrations.AlterField(
model_name='robotpkg',
name='pkgversion',
field=models.CharField(default='', max_length=50),
),
]
......@@ -298,10 +298,10 @@ class Project(Links, NamedModel, TimeStampedModel):
for tag in self.git().tags:
Tag.objects.get_or_create(name=str(tag), project=self)
def update(self):
def update(self, only_main_branches=True):
if self.main_namespace is None:
return
self.update_branches()
self.update_branches(main=only_main_branches)
self.update_tags()
tag = self.tag_set.filter(name__startswith='v').last() # TODO: implement SQL ordering for semver
if tag is not None:
......@@ -653,7 +653,7 @@ class Robotpkg(NamedModel):
category = models.CharField(max_length=50)
pkgbase = models.CharField(max_length=50, default='')
pkgversion = models.CharField(max_length=20, default='')
pkgversion = models.CharField(max_length=50, default='')
master_sites = models.CharField(max_length=200, default='')
master_repository = models.CharField(max_length=200, default='')
maintainer = models.CharField(max_length=200, default='')
......
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