From 68cec91506cad89f142d09cccf7e844a149a49ad Mon Sep 17 00:00:00 2001 From: Jonathan Teran Carballo Date: Mon, 21 Sep 2026 13:45:50 -0300 Subject: [PATCH] feature: add fetch depth --- .gitea/workflows/bump-build-publish.yaml | 16 +++++++++------- src/git_flow/command/tag.py | 2 -- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/bump-build-publish.yaml b/.gitea/workflows/bump-build-publish.yaml index 1e9537c..f0b68f7 100644 --- a/.gitea/workflows/bump-build-publish.yaml +++ b/.gitea/workflows/bump-build-publish.yaml @@ -10,6 +10,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v7 + with: + fetch-depth: 10 - name: Configure git run: | @@ -28,16 +30,16 @@ jobs: - name: Install git-flow and bump version id: version run: | - # pip install git-flow-envs=="${{ vars.GITFLOWENVS_VERSION }}" - uv run git-flow tag --token="${{ secrets.GITEA_TOKEN }}" - TAG=force + pip install git-flow-envs=="${{ vars.GITFLOWENVS_VERSION }}" + git-flow tag --token="${{ secrets.GITEA_TOKEN }}" + RESULT="$?" - if [ -z "$TAG" ]; then + if [ "$RESULT" -eq 0 ]; then + echo "New tag available." + echo "should_build=true" >> $GITHUB_OUTPUT + else echo "No new tag available, skipping next step." echo "should_build=false" >> $GITHUB_OUTPUT - else - echo "New tag available: $TAG." - echo "should_build=true" >> $GITHUB_OUTPUT fi - name: Build and publish diff --git a/src/git_flow/command/tag.py b/src/git_flow/command/tag.py index 14ace24..f65fd15 100644 --- a/src/git_flow/command/tag.py +++ b/src/git_flow/command/tag.py @@ -30,8 +30,6 @@ def tag(token: str | None = None, update_changelog: bool = False): if ci and not token: raise GitFlowError("No hay token disponible") - Git("log", oneline=True, graph=True, max_count=20).exec(print="Listado de commits") - merge_commit = Git( "log", first_parent=True, merges=True, max_count=1, format="%H" ).firstline()