From c3fe2f2f3a1dcb5dff0d8a119d992cb243cfc6f6 Mon Sep 17 00:00:00 2001 From: gilesb Date: Mon, 23 Oct 2023 15:55:15 +0100 Subject: [PATCH] ..... --- .gitea/workflows/build->develop.yml | 18 +----------------- ...elop -> build.-yml => develop -> build.yml} | 2 +- 2 files changed, 2 insertions(+), 18 deletions(-) rename .gitea/workflows/{develop -> build.-yml => develop -> build.yml} (99%) diff --git a/.gitea/workflows/build->develop.yml b/.gitea/workflows/build->develop.yml index dfae7b1..4c1a328 100644 --- a/.gitea/workflows/build->develop.yml +++ b/.gitea/workflows/build->develop.yml @@ -59,23 +59,7 @@ jobs: echo 'pushed new branch and created pr'; else if [[ $(git diff origin/${{ env.DEVELOPMENT_BRANCH }} | wc -c) -ne 0 ]]; then - git clone ${{ github.serverUrl }}/${{ github.repository }} ../cloned - git -C ../cloned fetch origin #--depth=1 - git -C ../cloned branch -r - git -C ../cloned checkout $DEVELOPMENT_BRANCH || git -C ../cloned checkout -b $DEVELOPMENT_BRANCH - mv ../cloned/.git .. - rm -rf ../cloned - cp -r . ../cloned - rm -rf ../cloned/.git - mv ../.git ../cloned - mv .git/config ../cloned/.git - rm -r ./* - rm -r .git - mv ../cloned/* . - mv ../cloned/.git . - git status - git add -A - git commit -a -m "${{ github.ref_name }} -> ${{ env.DEVELOPMENT_BRANCH }}" + git rebase origin/${{ env.DEVELOPMENT_BRANCH }} --strategy-option theirs git push origin HEAD:${{ env.DEVELOPMENT_BRANCH }}; else echo 'no changes so no push' diff --git a/.gitea/workflows/develop -> build.-yml b/.gitea/workflows/develop -> build.yml similarity index 99% rename from .gitea/workflows/develop -> build.-yml rename to .gitea/workflows/develop -> build.yml index 6a3d2db..b51fe02 100644 --- a/.gitea/workflows/develop -> build.-yml +++ b/.gitea/workflows/develop -> build.yml @@ -44,7 +44,7 @@ jobs: git push origin HEAD:${{ env.BUILD_BRANCH }}; else if [[ $(git diff origin/${{ env.BUILD_BRANCH }} | wc -c) -ne 0 ]]; then - git rebase origin/${{ env.BUILD_BRANCH }} --strategy ours + git rebase origin/${{ env.BUILD_BRANCH }} --strategy-option theirs git push origin HEAD:${{ env.BUILD_BRANCH }} else echo 'no changes so no push'