Compare commits

...
7 Commits
3 changed files with 31 additions and 12 deletions
+17
View File
@@ -1,3 +1,20 @@
## v1.6.2 - 2025-12-04
- **bugfix**: crear changelog cuando no existe [[jteran](mailto:jteran@renatre.org.ar)] (0c8e7bb)
---
## v1.6.1 - 2025-11-29
### Commits
- **bugfix**: arreglo mensaje de confirmacion de squash, muevo prompt de commit message antes del squash [[jonathan.nerat](mailto:jonathan.nerat@gmail.com)] (f1f6e67)
- **bugfix**: cambio default en confirmacion para agrupar release [[jonathan.nerat](mailto:jonathan.nerat@gmail.com)] (83df7e9)
---
## v1.6.0 - 2025-11-29 ## v1.6.0 - 2025-11-29
### Commits ### Commits
+3 -4
View File
@@ -16,8 +16,6 @@ class Changelog:
return f"""## {title} - {now.strftime("%F")} return f"""## {title} - {now.strftime("%F")}
### Commits
""" """
def generate_content(self, base: str, branch: str): def generate_content(self, base: str, branch: str):
@@ -56,5 +54,6 @@ class Changelog:
if isfile(self.FILENAME): if isfile(self.FILENAME):
with open(self.FILENAME, "r") as f: with open(self.FILENAME, "r") as f:
content += f.read() content += f.read()
with open(self.FILENAME, "w") as f:
f.write(content) with open(self.FILENAME, "w") as f:
f.write(content)
+11 -8
View File
@@ -45,7 +45,7 @@ class ReleaseCommand(Command):
group = args.group group = args.group
if not group and self.confirm("¿Desea agrupar este release con otra rama?"): if not group and self.confirm("¿Desea agrupar este release con otra rama?", False):
group = self.choice("Grupo release: ", Git.get_branches("release/" + next_env + "/")) group = self.choice("Grupo release: ", Git.get_branches("release/" + next_env + "/"))
else: else:
group = next_env group = next_env
@@ -59,20 +59,23 @@ class ReleaseCommand(Command):
commits = int(Git("rev-list", base + "..", count=True).firstline()) commits = int(Git("rev-list", base + "..", count=True).firstline())
if commits > 1 and self.confirm( if commits > 1 and self.confirm(
"Desea reemplazar los {commits} commits de la rama por uno solo?" f"¿Desea reemplazar los {commits} commits de la rama por uno solo?",
False
): ):
Git("switch", next_branch, base, create=True).exec( self.info("Debe ingresar el mensaje del commit a crear.")
print="Creando rama release en base"
)
Git("merge", branch, squash=True).exec(
print="Squasheando commits en uno solo"
)
commit_type = self.choice("Tipo de commit", COMMIT_TYPES[:-1]) commit_type = self.choice("Tipo de commit", COMMIT_TYPES[:-1])
commit_message = self.prompt( commit_message = self.prompt(
"Mensaje (máximo recomendado: 100 caracteres)", persistent=True "Mensaje (máximo recomendado: 100 caracteres)", persistent=True
) )
message = commit_type + ": " + commit_message message = commit_type + ": " + commit_message
Git("switch", next_branch, base, create=True).exec(
print="Creando rama release en base"
)
Git("merge", branch, squash=True).exec(
print="Squasheando commits en uno solo"
)
Git("commit", m=message).exec(print="Creando commit único") Git("commit", m=message).exec(print="Creando commit único")
else: else:
Git("switch", next_branch, create=True).exec(print="Creando rama release") Git("switch", next_branch, create=True).exec(print="Creando rama release")