@@ -149,7 +149,9 @@ def update_deb(ctx: Context, salt_version: Version, draft: bool = False):
149149 if salt_version is None :
150150 salt_version = _get_salt_version (ctx )
151151 changes = _get_pkg_changelog_contents (ctx , salt_version )
152- formated = "\n " .join ([f" { _ .replace ('-' , '*' , 1 )} " for _ in changes .split ("\n " )])
152+ formated = "\n " .join (
153+ [f" { _ .replace ('-' , '*' , 1 )} " if _ .strip () else "" for _ in changes .split ("\n " )]
154+ )
153155 dt = datetime .datetime .utcnow ()
154156 date = dt .strftime ("%a, %d %b %Y %H:%M:%S +0000" )
155157 tmpchanges = "pkg/rpm/salt.spec.1"
@@ -256,13 +258,15 @@ def update_release_notes(
256258 return
257259
258260 unreleased = " - UNRELEASED"
259- warning = """
260- <!---
261- Do not edit this file. This is auto generated.
262- Edit the templates in doc/topics/releases/templates/
263- for a given release.
264- -->
265- """
261+ warning = textwrap .dedent (
262+ """
263+ <!---
264+ Do not edit this file. This is auto generated.
265+ Edit the templates in doc/topics/releases/templates/
266+ for a given release.
267+ -->
268+ """
269+ ).strip ()
266270 if release is True :
267271 unreleased = ""
268272
@@ -279,7 +283,7 @@ def update_release_notes(
279283
280284 tmp_release_notes_path .write_text (content )
281285 try :
282- contents = tmp_release_notes_path .read_text ().strip ()
286+ contents = tmp_release_notes_path .read_text ().strip () + " \n "
283287 if draft :
284288 ctx .print (contents , soft_wrap = True )
285289 else :
0 commit comments