Update list_weeks to use the release yamlutils
It's a little more verbose but this is essentially the same as running format-yaml over the generated file. While this isn't "needed" it isn't a functional change and makes it easier to write a tool for the elections repo to generate changes like: https://review.opendev.org/q/I954afb4aad4286a8a6641ef8800541a8822a38f2 Change-Id: Iae5a79e362ea30396c70708a48005b44ec67fd62
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
import yaml
|
from openstack_releases import yamlutils
|
||||||
|
|
||||||
|
|
||||||
def mk_entry(name, week, cross_project=None, project_specific=None):
|
def mk_entry(name, week, cross_project=None, project_specific=None):
|
||||||
@@ -84,10 +84,9 @@ for n, w in enumerate(weeks, 1):
|
|||||||
cycle.append(mk_entry(name, w, cross_project=cross_project))
|
cycle.append(mk_entry(name, w, cross_project=cross_project))
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
|
'start-week': '{:%Y-%m-%d}'.format(weeks[0]),
|
||||||
|
'release-week': '{:%Y-%m-%d}'.format(next_release_date),
|
||||||
'cycle': cycle,
|
'cycle': cycle,
|
||||||
}
|
}
|
||||||
|
|
||||||
print('---')
|
print(yamlutils.dumps(data))
|
||||||
print('start-week: {:%Y-%m-%d}'.format(weeks[0]))
|
|
||||||
print('release-week: {:%Y-%m-%d}'.format(next_release_date))
|
|
||||||
print(yaml.dump(data, default_flow_style=False, explicit_start=False))
|
|
||||||
|
Reference in New Issue
Block a user