From 0e75a8ec1fddbca81125ea2a19256036c9ffa37e Mon Sep 17 00:00:00 2001 From: Jonathan Teran Carballo Date: Fri, 21 Nov 2025 20:33:55 -0300 Subject: [PATCH 1/2] style: ignorar carpeta dist/ --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index bf2a2e2..7a5bee5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ **/__pycache__/ build/ **/*.egg-info/ +dist/ From 222c819b3660c73b1714131cb1a1570b19bb4716 Mon Sep 17 00:00:00 2001 From: Jonathan Teran Carballo Date: Fri, 21 Nov 2025 20:41:37 -0300 Subject: [PATCH 2/2] bugfix: creo tag en el commit que actualiza el changelog --- src/git_flow/command/tag.py | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/git_flow/command/tag.py b/src/git_flow/command/tag.py index 53b4fdf..c4cb1b3 100644 --- a/src/git_flow/command/tag.py +++ b/src/git_flow/command/tag.py @@ -28,11 +28,7 @@ class TagCommand(Command): if target not in envs: raise GitFlowError("Solo se pueden taggear commits en ramas principales.") - merge_commit = self.get_last_merge_commit() - - self.check_not_tagged(merge_commit) - - branch = Git("show", merge_commit + "^2", patch=False, format="%h").firstline() + branch = Git("show", self.get_last_merge_commit() + "^2", patch=False, format="%h").firstline() base = Git.get_first_fork_point(branch, target) commits = Git("log", base + ".." + branch, format="%s").lines() next_tag = self.get_next_tag_from_commits(commits, target) @@ -44,18 +40,20 @@ class TagCommand(Command): return (token, ci) = self.get_token_and_ci(args) + changelog = Changelog() + + changelog.update(next_tag, base, branch) + Git("add", Changelog.FILENAME).exec() + Git("commit", message=Changelog.COMMIT_MESSAGE).exec() + tag_commit = Git("show", "HEAD", patch=False, format="%h").firstline() + + self.check_not_tagged(tag_commit) if ci: - message = self.get_remote_api(token).create_tag(next_tag, merge_commit) - changelog = Changelog() - - self.success(message) - changelog.update(next_tag, base, branch) - Git("add", Changelog.FILENAME).exec() - Git("commit", message=Changelog.COMMIT_MESSAGE).exec() Git("push").exec() + self.success(self.get_remote_api(token).create_tag(next_tag, tag_commit)) else: - Git("tag", next_tag, merge_commit).exec() + Git("tag", next_tag, tag_commit).exec() def get_token_and_ci(self, args: Namespace): try: @@ -86,7 +84,7 @@ class TagCommand(Command): ) if tag: - raise GitFlowError("El ultimo merge ya tiene tag: " + tag) + raise GitFlowError("El commit a taggear ya tiene tag: " + tag) def get_next_tag_from_commits(self, commits: list[str], branch: str) -> str | None: increment = SEMVER_SKIP