mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 01:30:20 +00:00
Do not delete news fragments(changelog files) on pre-releases.
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
c83431e3ef
commit
22092526e7
1 changed files with 4 additions and 2 deletions
|
@ -365,8 +365,10 @@ def generate_changelog_md(ctx: Context, salt_version: Version, draft: bool = Fal
|
|||
salt_version = _get_salt_version(ctx)
|
||||
cmd = ["towncrier", "build", f"--version={salt_version}"]
|
||||
if draft:
|
||||
cmd += ["--draft"]
|
||||
cmd.append("--draft")
|
||||
elif salt_version.is_prerelease:
|
||||
cmd.append("--keep")
|
||||
else:
|
||||
cmd += ["--yes"]
|
||||
cmd.append("--yes")
|
||||
ctx.run(*cmd, check=True)
|
||||
ctx.run("git", "restore", "--staged", "CHANGELOG.md", "changelog/", check=True)
|
||||
|
|
Loading…
Add table
Reference in a new issue