From aef0e6d970db77c7c64ed23909c1517ed68ee6ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ph=C3=A9na=20Proxima?= <adam@phenaproxima.net>
Date: Thu, 5 Dec 2024 12:54:58 -0500
Subject: [PATCH] Subtree split job should overwrite the existing tag before
 pushing

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 54deca60..63d04cfc 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -249,7 +249,7 @@ subtree split:
     - git checkout -b split $COMMIT
     - git remote set-url origin $URL
     - git remote -v
-    - if [[ -n "$CI_COMMIT_BRANCH" ]]; then git push origin HEAD:$CI_COMMIT_BRANCH; elif [[ -n "$CI_COMMIT_TAG" ]]; then git tag $CI_COMMIT_TAG && git push origin $CI_COMMIT_TAG; fi
+    - if [[ -n "$CI_COMMIT_BRANCH" ]]; then git push origin HEAD:$CI_COMMIT_BRANCH; elif [[ -n "$CI_COMMIT_TAG" ]]; then git tag --force $CI_COMMIT_TAG && git push origin $CI_COMMIT_TAG; fi
   rules:
     # Only do this job if we're pushing to a release branch or tag, and aren't in a fork.
     - if: ($CI_COMMIT_BRANCH =~ /^([0-9]+\.)?[0-9]+\.x$/ || $CI_COMMIT_TAG) && $CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_ROOT_NAMESPACE == "project"
-- 
GitLab