Compare commits

...
9 Commits
Author SHA1 Message Date
bitbucket-pipelines 4dbef58e90 chore: bump version and update CHANGELOG.md [skip ci] 2025-11-21 23:44:00 +00:00
JonathanGitFlowandjt da385154d4 Merged in bugfix/tag-on-update-changelog (pull request #29)
bugfix: tag on update changelog

Approved-by: Jonathan Teran
2025-11-21 23:42:01 +00:00
jt 222c819b36 bugfix: creo tag en el commit que actualiza el changelog 2025-11-21 20:41:37 -03:00
jt 0e75a8ec1f style: ignorar carpeta dist/ 2025-11-21 20:33:55 -03:00
bitbucket-pipelines 58401bf6e1 chore: bump version and update CHANGELOG.md [skip ci] 2025-11-21 17:43:26 +00:00
JonathanGitFlowandjt acf1c0fdc8 Merged in refactor/separate-command-files (pull request #28)
refactor: separate command files

Approved-by: Jonathan Teran
2025-11-21 17:42:59 +00:00
jt bf829a114b bugfix: separar etapa de lectura y escritura de changelog 2025-11-21 14:41:49 -03:00
JonathanGitFlowandjt b8e43f065c Merged in refactor/separate-command-files (pull request #27)
refactor: separate command files

Approved-by: Jonathan Teran
2025-11-20 00:06:34 +00:00
jt 8d973f0b2b bugfix: separar etapa de lectura y escritura de changelog 2025-11-19 21:06:09 -03:00
4 changed files with 35 additions and 16 deletions
+1
View File
@@ -3,3 +3,4 @@
**/__pycache__/ **/__pycache__/
build/ build/
**/*.egg-info/ **/*.egg-info/
dist/
+20
View File
@@ -1,3 +1,23 @@
## v1.1.5 - 2025-11-21
### Commits
- **bugfix**: creo tag en el commit que actualiza el changelog [[jonathan.nerat](mailto:jonathan.nerat@gmail.com)] (222c819)
- **style**: ignorar carpeta dist/ [[jonathan.nerat](mailto:jonathan.nerat@gmail.com)] (0e75a8e)
---
## v1.1.4 - 2025-11-21
### Commits
- **bugfix**: separar etapa de lectura y escritura de changelog [[jonathan.nerat](mailto:jonathan.nerat@gmail.com)] (bf829a1)
- **bugfix**: agrego http:// como protocolo soportado para pipelines [[jonathan.nerat](mailto:jonathan.nerat@gmail.com)] (8f79a6a)
---
## Saturday, 8 de November de 2025, 00:28 ## Saturday, 8 de November de 2025, 00:28
- Autor: [bitbucket-pipelines](mailto:commits-noreply@bitbucket.org) - Autor: [bitbucket-pipelines](mailto:commits-noreply@bitbucket.org)
+2 -2
View File
@@ -54,7 +54,7 @@ class Changelog:
def _prepend(self, content: str): def _prepend(self, content: str):
if isfile(self.FILENAME): if isfile(self.FILENAME):
with open(self.FILENAME, "rw") as f: with open(self.FILENAME, "r") as f:
content += f.read() content += f.read()
f.seek(0) with open(self.FILENAME, "w") as f:
f.write(content) f.write(content)
+12 -14
View File
@@ -28,11 +28,7 @@ class TagCommand(Command):
if target not in envs: if target not in envs:
raise GitFlowError("Solo se pueden taggear commits en ramas principales.") raise GitFlowError("Solo se pueden taggear commits en ramas principales.")
merge_commit = self.get_last_merge_commit() branch = Git("show", self.get_last_merge_commit() + "^2", patch=False, format="%h").firstline()
self.check_not_tagged(merge_commit)
branch = Git("show", merge_commit + "^2", patch=False, format="%h").firstline()
base = Git.get_first_fork_point(branch, target) base = Git.get_first_fork_point(branch, target)
commits = Git("log", base + ".." + branch, format="%s").lines() commits = Git("log", base + ".." + branch, format="%s").lines()
next_tag = self.get_next_tag_from_commits(commits, target) next_tag = self.get_next_tag_from_commits(commits, target)
@@ -44,18 +40,20 @@ class TagCommand(Command):
return return
(token, ci) = self.get_token_and_ci(args) (token, ci) = self.get_token_and_ci(args)
changelog = Changelog()
changelog.update(next_tag, base, branch)
Git("add", Changelog.FILENAME).exec()
Git("commit", message=Changelog.COMMIT_MESSAGE).exec()
tag_commit = Git("show", "HEAD", patch=False, format="%h").firstline()
self.check_not_tagged(tag_commit)
if ci: if ci:
message = self.get_remote_api(token).create_tag(next_tag, merge_commit)
changelog = Changelog()
self.success(message)
changelog.update(next_tag, base, branch)
Git("add", Changelog.FILENAME).exec()
Git("commit", message=Changelog.COMMIT_MESSAGE).exec()
Git("push").exec() Git("push").exec()
self.success(self.get_remote_api(token).create_tag(next_tag, tag_commit))
else: else:
Git("tag", next_tag, merge_commit).exec() Git("tag", next_tag, tag_commit).exec()
def get_token_and_ci(self, args: Namespace): def get_token_and_ci(self, args: Namespace):
try: try:
@@ -86,7 +84,7 @@ class TagCommand(Command):
) )
if tag: if tag:
raise GitFlowError("El ultimo merge ya tiene tag: " + tag) raise GitFlowError("El commit a taggear ya tiene tag: " + tag)
def get_next_tag_from_commits(self, commits: list[str], branch: str) -> str | None: def get_next_tag_from_commits(self, commits: list[str], branch: str) -> str | None:
increment = SEMVER_SKIP increment = SEMVER_SKIP