refactor: update remote tag fetching behaviour so it uses api instead of shallow clone

This commit is contained in:
Jonathan Teran Carballo
2026-09-21 09:15:48 -03:00
parent eabef5eb33
commit 22ba8f5e5f
7 changed files with 89 additions and 14 deletions
+9 -2
View File
@@ -63,8 +63,15 @@ class Git:
return list(map(Git.Status, Git("status", porcelain=True).lines(False)))
@staticmethod
def get_current_tag():
return Git("describe", abbrev="0", tags=True).firstline(check=False, print="Obteniendo tag actual")
def get_current_tag(suffix: str = ""):
"""Último tag SemVer alcanzable desde HEAD, con el sufijo exacto indicado."""
return Git(
"describe",
abbrev="0",
tags=True,
match="v[0-9]*.[0-9]*.[0-9]*" + suffix,
exclude=None if suffix else "*-*",
).firstline(check=False, print="Obteniendo tag actual")
@staticmethod
def get_first_fork_point(branch: str, env: str):