Fix changelog generation for non-default versions

Currently if you generate a changelog for r0.1.1 of an API, you'd get "No significant changes" which is wrong. You should get a real changelog for the version.

This is now handled by generating a "preferred" changelog which acts as the default for version variables in the RST. Using a specific version's changelog is still supported for the rare cases where that is desired.
This commit is contained in:
Travis Ralston 2019-02-04 14:47:20 -07:00
parent baf00ba6d1
commit 54ee861b5f
2 changed files with 14 additions and 2 deletions

View file

@ -41,7 +41,7 @@ class MatrixSections(Sections):
version_var = "%s_%s" % (spec_var, version)
logger.info("Rendering changelog for %s" % version_var)
rendered[version_var] = changelog
if version == "unstable":
if version == "preferred":
rendered[spec_var] = changelog
return rendered