Create a bare skeleton for missing release notes

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2023-02-18 08:50:19 +00:00 committed by Pedro Algarvio
parent 191e2cd4b0
commit a0127f2186

View file

@ -355,7 +355,13 @@ def update_release_notes(ctx: Context, salt_version: str, draft: bool = False):
with open(f"doc/topics/releases/{major_version}.md") as rfp: with open(f"doc/topics/releases/{major_version}.md") as rfp:
existing = rfp.read() existing = rfp.read()
except FileNotFoundError: except FileNotFoundError:
existing = "" existing = textwrap.dedent(
f"""\
[](#release-{salt_version})
# Salt {salt_version} release notes - UNRELEASED
"""
)
with open(tmpnotes, "w") as wfp: with open(tmpnotes, "w") as wfp:
wfp.write(existing) wfp.write(existing)
wfp.write("\n## Changelog\n") wfp.write("\n## Changelog\n")