Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5e683a1da | ||
|
|
fb9b8b57f6 | ||
|
|
c47afffa14 | ||
|
|
341e6239b2 | ||
|
|
4fb00e786f | ||
|
|
2ad747111f | ||
|
|
5c3a3171fd | ||
|
|
50979e2c3d |
+8
-3
@@ -1,6 +1,11 @@
|
||||
# Bitbucket token
|
||||
.repository-token
|
||||
|
||||
**/__pycache__/
|
||||
build/
|
||||
**/*.egg-info/
|
||||
# Virtual environment
|
||||
venv/
|
||||
|
||||
# Build folders and artifacts
|
||||
dist/
|
||||
build/
|
||||
**/__pycache__/
|
||||
**/*.egg-info/
|
||||
|
||||
@@ -1,3 +1,23 @@
|
||||
## v1.6.0 - 2025-11-29
|
||||
|
||||
### Commits
|
||||
|
||||
- **feature**: agrego opcion para agrupar ramas release [[jonathan.nerat](mailto:jonathan.nerat@gmail.com)] (c47afff)
|
||||
|
||||
---
|
||||
|
||||
|
||||
## v1.5.2 - 2025-11-28
|
||||
|
||||
### Commits
|
||||
|
||||
- **bugfix**: arreglo split de ramas de flow.branches [[jteran](mailto:jteran@renatre.org.ar)] (2ad7471)
|
||||
- **bugfix**: arreglo iteracion de items de flowconfig en set_config [[jteran](mailto:jteran@renatre.org.ar)] (5c3a317)
|
||||
- **docs**: agrego venv a lista de carpetas ignoradas [[jteran](mailto:jteran@renatre.org.ar)] (50979e2)
|
||||
|
||||
---
|
||||
|
||||
|
||||
## v1.5.1 - 2025-11-27
|
||||
|
||||
### Commits
|
||||
|
||||
@@ -170,7 +170,7 @@ class Command(ABC):
|
||||
|
||||
def get_branch_env_and_type(self, branch: str) -> tuple[str, str]:
|
||||
components = branch.split("/")
|
||||
target_branches = self.flowconfig["flow.branches"].split(" ")
|
||||
target_branches = self.flowconfig["flow.branches"].split(",")
|
||||
|
||||
if len(components) == 2:
|
||||
if components[0] not in BRANCH_TYPES:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from argparse import Namespace
|
||||
from argparse import ArgumentParser, Namespace
|
||||
from git_flow import COMMIT_TYPES, GitFlowError
|
||||
from git_flow.command.base import Command
|
||||
from git_flow.git import Git
|
||||
@@ -11,6 +11,15 @@ class ReleaseCommand(Command):
|
||||
def description(self) -> str:
|
||||
return """Realiza el merge de la rama, o crea el PR para hacerlo si tiene un remoto configurado"""
|
||||
|
||||
def setup_parser(self, parser: ArgumentParser) -> ArgumentParser:
|
||||
parser.add_argument(
|
||||
"--group",
|
||||
nargs="?",
|
||||
help="Agrupar release",
|
||||
)
|
||||
|
||||
return parser
|
||||
|
||||
def run(self, args: Namespace = Namespace()):
|
||||
self.ensure_initialized()
|
||||
|
||||
@@ -34,10 +43,16 @@ class ReleaseCommand(Command):
|
||||
else f"release/{next_env}/{branch}"
|
||||
)
|
||||
|
||||
group = args.group
|
||||
|
||||
if not group and self.confirm("¿Desea agrupar este release con otra rama?"):
|
||||
group = self.choice("Grupo release: ", Git.get_branches("release/" + next_env + "/"))
|
||||
else:
|
||||
group = next_env
|
||||
|
||||
if has_remote:
|
||||
Git("pull").exec(print="Sincronizando cambios de la rama")
|
||||
Git("switch", next_env).exec(print="Cambiando al siguiente entorno")
|
||||
Git("pull").exec(print="Sincronizando cambios del entorno")
|
||||
Git("switch", group).exec(print="Cambiando a la rama objetivo")
|
||||
Git("pull").exec(print="Sincronizando cambios la rama objetivo")
|
||||
Git("switch", "-").exec(print="Volviendo a la rama original")
|
||||
|
||||
base = Git.get_first_fork_point(branch, env)
|
||||
@@ -62,6 +77,6 @@ class ReleaseCommand(Command):
|
||||
else:
|
||||
Git("switch", next_branch, create=True).exec(print="Creando rama release")
|
||||
|
||||
Git("rebase", base, next_branch, onto=next_env).exec(
|
||||
Git("rebase", base, next_branch, onto=group).exec(
|
||||
print="Moviendo cambios hacia el siguiente ambiente"
|
||||
)
|
||||
|
||||
+4
-4
@@ -38,7 +38,7 @@ class Git:
|
||||
|
||||
@staticmethod
|
||||
def set_config(config: dict[str, str], file: str | None = None):
|
||||
for key, value in config:
|
||||
for key, value in config.items():
|
||||
Git("config", key, value, file=file).exec()
|
||||
|
||||
@staticmethod
|
||||
@@ -50,8 +50,8 @@ class Git:
|
||||
return Git("rev-parse", "HEAD", abbrev_ref=True).firstline()
|
||||
|
||||
@staticmethod
|
||||
def get_branches():
|
||||
return Git._get_references("heads")
|
||||
def get_branches(prefix: str = ""):
|
||||
return Git._get_references("heads/" + prefix)
|
||||
|
||||
@staticmethod
|
||||
def status():
|
||||
@@ -79,7 +79,7 @@ class Git:
|
||||
|
||||
@staticmethod
|
||||
def _get_references(kind: str):
|
||||
prefix = "refs/" + kind + "/"
|
||||
prefix = "refs/" + kind
|
||||
return list(map(
|
||||
lambda r: r.removeprefix(prefix),
|
||||
Git("for-each-ref", prefix + "*", format="%(refname)").lines(),
|
||||
|
||||
Reference in New Issue
Block a user