feature: change exit code to 3 when no tag is needed, and skip build / publish in that case

This commit is contained in:
Jonathan Teran
2026-09-29 11:19:46 -03:00
parent 5cff0e4484
commit 98d5c4ab3d
3 changed files with 16 additions and 17 deletions
+5 -2
View File
@@ -14,6 +14,9 @@ from git_flow.git import Git
app = typer.Typer()
# Código de salida cuando no hace falta crear un tag, para que el CI pueda saltear la publicación
EXIT_NO_TAG_NEEDED = 3
@app.command()
def tag(target: str | None = None, token: str | None = None, update_changelog: bool = False):
@@ -35,7 +38,7 @@ def tag(target: str | None = None, token: str | None = None, update_changelog: b
merge_commit_tag = Git("tag", "--points-at", merge_commit).firstline()
if merge_commit_tag:
base.io_info(f"El último merge ya tiene un tag: {merge_commit_tag}")
return
raise typer.Exit(code=EXIT_NO_TAG_NEEDED)
token, ci = get_token_and_ci(token)
@@ -97,7 +100,7 @@ def tag(target: str | None = None, token: str | None = None, update_changelog: b
"Los cambios realizados no implican un salto de versión, se mantiene la anterior."
)
raise typer.Exit(code=1)
raise typer.Exit(code=EXIT_NO_TAG_NEEDED)
if update_changelog:
changelog = Changelog()