From d74bafeeef29e6adf2be8c350d1ee5a2756aff09 Mon Sep 17 00:00:00 2001 From: Jonathan Teran Carballo Date: Sun, 2 Nov 2025 15:46:56 -0300 Subject: [PATCH] feature: agrego soporte para tag de merge de ramas release --- git-flow | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/git-flow b/git-flow index b34c31e..ca72cde 100755 --- a/git-flow +++ b/git-flow @@ -357,8 +357,16 @@ def tag_command(): until_dash = last_version.index("-") if "-" in last_version else None [major, minor, patch] = map(int, last_version[from_major:until_dash].split(".")) - merged_branch_type = merged_branch[:merged_branch.index('/')] if '/' in merged_branch else merged_branch - increment = BRANCH_TYPES_INCREMENT[merged_branch_type] + components = merged_branch.split("/") + + if len(components) not in [2, 4]: + raise RuntimeError("Branch mergeado es inválido: " + merged_branch) + elif len(components) == 4 and components[0] != "release": + raise RuntimeError("Release branch mergeado es inválido: " + merged_branch) + elif components[-2] not in BRANCH_TYPES: + raise RuntimeError("Tipo de rama mergeado es inválido: " + components[-2]) + + increment = BRANCH_TYPES_INCREMENT[components[-2]] if increment == "major": major = major + 1