From 30c6258ab4d9d3dd1da9d250210895a6fe08da13 Mon Sep 17 00:00:00 2001 From: Thierry Carrez Date: Wed, 4 Jul 2018 14:40:58 +0200 Subject: [PATCH] init_series: no longer skip over unreleased Support 'stable' deliverables in init_series by not skipping over deliverables that did not get any old_series release. Add a warning to the generated YAML file instead. Change-Id: I0b79354f01604641a348db50fcbb43376ae3111d Task: 22350 --- openstack_releases/cmds/init_series.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/openstack_releases/cmds/init_series.py b/openstack_releases/cmds/init_series.py index d7ead6428b..ce30dce14f 100644 --- a/openstack_releases/cmds/init_series.py +++ b/openstack_releases/cmds/init_series.py @@ -60,16 +60,11 @@ def main(): print('creating output directory {}'.format(outdir)) os.mkdir(outdir) + warn = '# Note: deliverable was not released in %s\n' % args.old_series old_deliverables = all_deliv.get_deliverables(None, args.old_series) for deliv in old_deliverables: if deliv.name in new_deliverables: continue - if not deliv.is_released and not deliv.branches: - # There were no releases for the deliverable in the - # previous series, stop carrying it over. - print('{} skipped (no releases in {})'.format( - deliv.name, args.old_series)) - continue # Clean up some series-specific data that should not be copied # over. raw_data = deliv.data @@ -82,3 +77,7 @@ def main(): with open(outfilename, 'w', encoding='utf-8') as f: print('{} created'.format(outfilename)) f.write(yamlutils.dumps(raw_data)) + if not deliv.is_released and not deliv.branches: + # There were no releases for the deliverable in the + # previous series, add a comment in the file. + f.write(warn)