Strip white-space from included changelog

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2023-02-07 07:03:23 +00:00 committed by Pedro Algarvio
parent 0e65d2f106
commit bc45a639d6

View file

@ -247,11 +247,12 @@ def update_release_notes(ctx: Context, salt_version: str, draft: bool = False):
wfp.write(changes) wfp.write(changes)
try: try:
with open(tmpnotes) as rfp: with open(tmpnotes) as rfp:
contents = rfp.read().strip()
if draft: if draft:
ctx.info(rfp.read()) ctx.print(contents, soft_wrap=True)
else: else:
with open(f"doc/topics/releases/{salt_version}.rst", "w") as wfp: with open(f"doc/topics/releases/{salt_version}.rst", "w") as wfp:
wfp.write(rfp.read()) wfp.write(contents)
finally: finally:
os.remove(tmpnotes) os.remove(tmpnotes)