optionally do not collapse pre-releases
Add an option to avoid collapsing pre-releases to allow the command line query interface to have full access to all of the data. Change-Id: I526b55924ba4b5749d8293b211a004517e760fd2 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
@@ -95,8 +95,9 @@ def _collapse_deliverable_history(name, info):
|
|||||||
|
|
||||||
class Deliverables(object):
|
class Deliverables(object):
|
||||||
|
|
||||||
def __init__(self, root_dir):
|
def __init__(self, root_dir, collapse_history=True):
|
||||||
self._root_dir = root_dir
|
self._root_dir = root_dir
|
||||||
|
self._collapse_history = collapse_history
|
||||||
|
|
||||||
# Map team names to a list of all of their deliverables.
|
# Map team names to a list of all of their deliverables.
|
||||||
self._team_deliverables = collections.defaultdict(set)
|
self._team_deliverables = collections.defaultdict(set)
|
||||||
@@ -119,6 +120,7 @@ class Deliverables(object):
|
|||||||
deliverable = self._deliverable_from_filename(filename)
|
deliverable = self._deliverable_from_filename(filename)
|
||||||
with open(filename, 'r') as f:
|
with open(filename, 'r') as f:
|
||||||
d_info = yaml.load(f.read())
|
d_info = yaml.load(f.read())
|
||||||
|
if self._collapse_history:
|
||||||
_collapse_deliverable_history(deliverable, d_info)
|
_collapse_deliverable_history(deliverable, d_info)
|
||||||
team = d_info['team']
|
team = d_info['team']
|
||||||
self._add_deliverable_file(
|
self._add_deliverable_file(
|
||||||
|
|||||||
Reference in New Issue
Block a user