update release announcement script to work with reno 2.0.0

The API for interacting with reno directly changed to allow the use of a
configuration file, so we need to update how we invoke it.

Change-Id: I7e092034075e8017f90a42a91311952aaf9d3c52
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2016-12-21 15:42:02 -05:00
parent a70e7424e9
commit b9a73e1078
1 changed files with 6 additions and 7 deletions

View File

@ -24,7 +24,7 @@ import sys
import jinja2
from oslo_concurrency import processutils
import parawrap
from reno import defaults as reno_defaults
from reno import config as reno_config
from reno import formatter
from reno import loader
@ -311,15 +311,14 @@ def generate_release_notes(library, library_path,
change_header.append("-" * len(change_header[0]))
# Look for reno notes for this version.
cfg = reno_config.Config(
reporoot=library_path,
)
branch = None
if is_stable and series:
branch = 'origin/stable/%s' % series
ldr = loader.Loader(
reporoot=library_path,
notesdir='%s/%s' % (reno_defaults.RELEASE_NOTES_SUBDIR,
reno_defaults.NOTES_SUBDIR),
branch=branch,
)
cfg.override(branch=branch)
ldr = loader.Loader(conf=cfg)
if end_revision in ldr.versions:
rst_notes = formatter.format_report(
ldr,