From ad76e1367320b37861561942dceab565e16d89d4 Mon Sep 17 00:00:00 2001 From: Jonathan Teran Date: Mon, 21 Sep 2026 11:28:28 -0300 Subject: [PATCH] feature: dont update changelog by default --- src/git_flow/command/tag.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/git_flow/command/tag.py b/src/git_flow/command/tag.py index 1c58363..2393f2e 100644 --- a/src/git_flow/command/tag.py +++ b/src/git_flow/command/tag.py @@ -18,7 +18,7 @@ app = typer.Typer() @app.command() -def tag(token: Optional[str] = None): +def tag(token: Optional[str] = None, update_changelog: bool = False): """Crea un nuevo tag para el Ășltimo merge.""" base.ensure_initialized() @@ -69,15 +69,18 @@ def tag(token: Optional[str] = None): ) return - changelog = Changelog() + if update_changelog: + changelog = Changelog() + changelog.update(next_tag, commits) + Git("add", Changelog.FILENAME).exec(print=None if ci else "Agregando nuevo CHANGELOG.md") + Git("commit", message=Changelog.COMMIT_MESSAGE).exec(print=None if ci else "Creando commit") + + if ci: + Git("push").exec() - changelog.update(next_tag, commits) - Git("add", Changelog.FILENAME).exec(print=None if ci else "Agregando nuevo CHANGELOG.md") - Git("commit", message=Changelog.COMMIT_MESSAGE).exec(print=None if ci else "Creando commit") tag_commit = Git("show", "HEAD", patch=False, format="%h").firstline() if ci: - Git("push").exec() base.get_remote_api(token).create_tag(next_tag, tag_commit) print(next_tag)