Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a758cdb94 | ||
|
|
b148a9f71d | ||
|
|
2e65cb7a3e | ||
|
|
9c8df34a09 | ||
|
|
89f8bc58ba | ||
|
|
4e089dc4d6 | ||
|
|
c8e1a7cc88 | ||
|
|
65be7a01f0 | ||
|
|
7ce6addf07 | ||
|
|
824b5f06de | ||
|
|
9937f4b6bc | ||
|
|
053b8b102b |
@@ -1,3 +1,32 @@
|
||||
## v1.7.0 - 2025-12-11
|
||||
|
||||
- **feature**: muestro el listado de commits a pasar al siguiente entorno en release [[jteran](mailto:jteran@renatre.org.ar)] (2e65cb7)
|
||||
|
||||
---
|
||||
|
||||
|
||||
## v1.6.4 - 2025-12-10
|
||||
|
||||
- **bugfix**: cambio la lista de commits a mostrar en el merge [[jteran](mailto:jteran@renatre.org.ar)] (4e089dc)
|
||||
|
||||
---
|
||||
|
||||
|
||||
## v1.6.3 - 2025-12-04
|
||||
|
||||
- **bugfix**: revertir guion entre version y entorno, agregar guion a sufijo [[jteran](mailto:jteran@renatre.org.ar)] (7ce6add)
|
||||
- **bugfix**: agrego guion entre version y nombre de entorno [[jteran](mailto:jteran@renatre.org.ar)] (053b8b1)
|
||||
|
||||
---
|
||||
|
||||
|
||||
## v1.6.3- - 2025-12-04
|
||||
|
||||
- **bugfix**: agrego guion entre version y nombre de entorno [[jteran](mailto:jteran@renatre.org.ar)] (053b8b1)
|
||||
|
||||
---
|
||||
|
||||
|
||||
## v1.6.2 - 2025-12-04
|
||||
|
||||
- **bugfix**: crear changelog cuando no existe [[jteran](mailto:jteran@renatre.org.ar)] (0c8e7bb)
|
||||
|
||||
@@ -17,16 +17,15 @@ class MergeCommand(Command):
|
||||
|
||||
branch = self.ensure_right_branch()
|
||||
(target, _) = self.get_branch_env_and_type(branch)
|
||||
base = Git.get_first_fork_point(branch, target)
|
||||
|
||||
if "flow.remote" in self.flowconfig:
|
||||
remote = self.flowconfig["flow.remote"]
|
||||
token = self.ensure_repository_token()
|
||||
self.run_remote(remote, token, base, branch, target)
|
||||
self.run_remote(remote, token, branch, target)
|
||||
else:
|
||||
self.run_local(base, branch, target)
|
||||
self.run_local(branch, target)
|
||||
|
||||
def run_remote(self, remote: str, token: str, base: str, branch: str, target: str):
|
||||
def run_remote(self, remote: str, token: str, branch: str, target: str):
|
||||
self.ensure_clean_worktree(True)
|
||||
|
||||
Git("switch", target).exec(print="Cambiando a rama destino")
|
||||
@@ -34,26 +33,26 @@ class MergeCommand(Command):
|
||||
Git("switch", "-").exec(print="Volviendo a rama a mergear")
|
||||
|
||||
self.check_merge_conflicts(target)
|
||||
self.show_commits_to_merge(base)
|
||||
self.show_commits_to_merge(target)
|
||||
|
||||
if self.confirm(f"¿Crear PR de '{branch}' a '{target}'?"):
|
||||
Git("push", remote, branch, set_upstream=True).exec(
|
||||
print="Subiendo rama al remoto para crear PR"
|
||||
)
|
||||
|
||||
self.create_pull_request(token, base, branch, target)
|
||||
self.create_pull_request(token, branch, target)
|
||||
|
||||
def run_local(self, base: str, branch: str, target: str):
|
||||
def run_local(self, branch: str, target: str):
|
||||
self.ensure_clean_worktree(False)
|
||||
self.check_merge_conflicts(target)
|
||||
self.show_commits_to_merge(base)
|
||||
self.show_commits_to_merge(target)
|
||||
|
||||
if self.confirm(f"¿Mergear rama '{branch}' a '{target}'?"):
|
||||
Git("switch", target).exec(print="Cambiando a rama destino")
|
||||
Git("merge", branch, ff=False).exec(print="Mergeando")
|
||||
|
||||
def show_commits_to_merge(self, base):
|
||||
commits = Git("log", base + "..", format="%s").lines()
|
||||
def show_commits_to_merge(self, target):
|
||||
commits = Git("log", target + "..", format="%s").lines()
|
||||
|
||||
if not commits:
|
||||
raise GitFlowError("No hay cambios a mergear.")
|
||||
@@ -79,14 +78,14 @@ class MergeCommand(Command):
|
||||
else:
|
||||
self.success("No se detectaron merge conflicts.")
|
||||
|
||||
def create_pull_request(self, token: str, base: str, branch: str, target: str):
|
||||
def create_pull_request(self, token: str, branch: str, target: str):
|
||||
changelog = Changelog()
|
||||
|
||||
message = self.get_remote_api(token).create_pull_request(
|
||||
branch,
|
||||
target,
|
||||
branch.replace("/", ": ").replace("-", " "),
|
||||
changelog.generate_content(base, branch),
|
||||
changelog.generate_content(target, branch),
|
||||
)
|
||||
|
||||
self.success(message)
|
||||
|
||||
@@ -43,6 +43,17 @@ class ReleaseCommand(Command):
|
||||
else f"release/{next_env}/{branch}"
|
||||
)
|
||||
|
||||
base = Git.get_first_fork_point(branch, env)
|
||||
commits = Git("log", base + ".." , format="%s").lines()
|
||||
|
||||
if not commits:
|
||||
raise GitFlowError("No hay cambios a mergear.")
|
||||
|
||||
print("Cambios a pasar al proximo entorno:")
|
||||
|
||||
for commit in commits:
|
||||
print("- " + commit)
|
||||
|
||||
group = args.group
|
||||
|
||||
if not group and self.confirm("¿Desea agrupar este release con otra rama?", False):
|
||||
@@ -55,11 +66,8 @@ class ReleaseCommand(Command):
|
||||
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)
|
||||
commits = int(Git("rev-list", base + "..", count=True).firstline())
|
||||
|
||||
if commits > 1 and self.confirm(
|
||||
f"¿Desea reemplazar los {commits} commits de la rama por uno solo?",
|
||||
if len(commits) > 1 and self.confirm(
|
||||
f"¿Desea reemplazar los {len(commits)} commits de la rama por uno solo?",
|
||||
False
|
||||
):
|
||||
self.info("Debe ingresar el mensaje del commit a crear.")
|
||||
|
||||
@@ -91,7 +91,7 @@ class TagCommand(Command):
|
||||
tag = Git.get_current_tag() or f"v0.0.0-{branch}"
|
||||
|
||||
until_dash = tag.index("-") if "-" in tag else None
|
||||
suffix = tag[until_dash + 1 :] if until_dash is not None else ""
|
||||
suffix = tag[until_dash:] if until_dash is not None else ""
|
||||
[major, minor, patch] = map(int, tag[1:until_dash].split("."))
|
||||
|
||||
if increment == SEMVER_MAJOR:
|
||||
|
||||
Reference in New Issue
Block a user