From e7c472a0c2004f5513daa4c2f35475a7d7dfd75c Mon Sep 17 00:00:00 2001 From: James Maes Date: Fri, 6 Nov 2026 17:38:54 -0600 Subject: [PATCH] fix: tag releases commit back to main only if main exists qbit-document-generation v1.0.0 published but went red pushing to a missing main. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/maven.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/maven.yaml b/.gitea/workflows/maven.yaml index 10794e7..bc61388 100644 --- a/.gitea/workflows/maven.yaml +++ b/.gitea/workflows/maven.yaml @@ -206,7 +206,9 @@ jobs: push_branch="" elif [[ $REF_TYPE == tag ]]; then new=${REF_NAME#v} - push_branch=main + # Commit the release version back to main only where main exists (some repos only have develop). + push_branch="" + if git ls-remote --exit-code --heads origin main > /dev/null; then push_branch=main; fi elif [[ $REF_NAME == "$SNAPSHOT_BRANCH" ]]; then new=$current recent=$(git log --oneline -10 --since="3 days ago" \