provide a tool to import existing stable branch info

Find the versions for which the stable branches were created and update
the deliverable files with the historical info.

Change-Id: Idb233e0ec78f2b7ea0f07d596d6452786f725315
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann
2016-12-02 14:55:53 -05:00
parent e97e7707d9
commit d4dfecad2f
3 changed files with 208 additions and 2 deletions

View File

@@ -15,6 +15,7 @@
"""
import collections
import copy
import glob
import os
@@ -188,6 +189,10 @@ class Deliverable(object):
self.series = series
self.name = name
self._data = data
self.repos = set()
for r in self.releases:
for p in r['projects']:
self.repos.add(p['repo'])
@property
def model(self):
@@ -205,7 +210,7 @@ class Deliverable(object):
@property
def latest_release(self):
rel = self._data.get('releases', [{}])[0]
rel = (self.releases or [{}])[0]
return rel.get('version')
@property
@@ -216,9 +221,13 @@ class Deliverable(object):
def versions(self):
return [
r['version']
for r in self._data.get('releases', [])
for r in self.releases
]
@property
def releases(self):
return copy.deepcopy(self._data.get('releases', []))
def get_branch_location(self, name):
branches = self._data.get('branches', [])
for b in branches: