add --unreleased option to list-deliverables

Add a flag to list official deliverables that have not been released in
a series.

Change-Id: I384a0bb13410f26aa38e266ebd805bd64b0c0918
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2016-12-01 14:34:58 -05:00
parent 3113ef1e42
commit 132d5abc28
2 changed files with 15 additions and 1 deletions

View File

@ -61,6 +61,12 @@ def main():
action='store_true',
help='limit the list to deliverables without a stable branch',
)
parser.add_argument(
'--unreleased',
default=False,
action='store_true',
help='limit the list to deliverables not released in the cycle',
)
args = parser.parse_args()
# Deal with the inconsistency of the name for the independent
@ -85,5 +91,6 @@ def main():
if args.no_stable_branch:
if deliv.get_branch_location('stable/' + series) is not None:
continue
if args.unreleased and deliv.versions:
continue
print(deliv.name)

View File

@ -212,6 +212,13 @@ class Deliverable(object):
def release_notes(self):
return self._data.get('release-notes', '')
@property
def versions(self):
return [
r['version']
for r in self._data.get('releases', [])
]
def get_branch_location(self, name):
branches = self._data.get('branches', [])
for b in branches: