From 29d4956722c6b5c5c1a0b5d028eeb8e67eeb7b90 Mon Sep 17 00:00:00 2001 From: norvell Date: Tue, 28 May 2024 12:16:31 +0000 Subject: [PATCH 1/6] Add git prune to .update-scripts-repo --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9bfbcb4ce..a6c1cb3ca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -125,6 +125,7 @@ stages: - cd $SCRIPTS_DIR - git remote set-branches --add origin $BASOP_CI_BRANCH_PC_REPO - git remote prune origin + - git prune - git branch - git fetch - git checkout $BASOP_CI_BRANCH_PC_REPO -- GitLab From dd218031109400aa071105299462be645eb343b1 Mon Sep 17 00:00:00 2001 From: norvell Date: Tue, 28 May 2024 13:15:11 +0000 Subject: [PATCH 2/6] Update .gitlab-ci.yml --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a6c1cb3ca..8caa1d724 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -126,6 +126,7 @@ stages: - git remote set-branches --add origin $BASOP_CI_BRANCH_PC_REPO - git remote prune origin - git prune + - git fetch --prune - git branch - git fetch - git checkout $BASOP_CI_BRANCH_PC_REPO -- GitLab From 424ba7edac7d706277eafc1b96f41e2ec6a1aca4 Mon Sep 17 00:00:00 2001 From: norvell Date: Tue, 28 May 2024 13:20:57 +0000 Subject: [PATCH 3/6] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8caa1d724..5df9bb907 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -126,7 +126,7 @@ stages: - git remote set-branches --add origin $BASOP_CI_BRANCH_PC_REPO - git remote prune origin - git prune - - git fetch --prune + - for branch in $(git branch | grep -v $BASOP_CI_BRANCH_PC_REPO | sed 's/\*//'); do git branch -D $branch; done - git branch - git fetch - git checkout $BASOP_CI_BRANCH_PC_REPO -- GitLab From ceb9d7d3a1ef50f739b32ad9a19305357c1da77d Mon Sep 17 00:00:00 2001 From: norvell Date: Tue, 28 May 2024 13:29:29 +0000 Subject: [PATCH 4/6] Update .gitlab-ci.yml --- .gitlab-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5df9bb907..2663e794e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -124,11 +124,10 @@ stages: .update-scripts-repo: &update-scripts-repo - cd $SCRIPTS_DIR - git remote set-branches --add origin $BASOP_CI_BRANCH_PC_REPO + - for branch in $(git branch | grep -v $BASOP_CI_BRANCH_PC_REPO | sed 's/\*//'); do git branch -D $branch; done - git remote prune origin - git prune - - for branch in $(git branch | grep -v $BASOP_CI_BRANCH_PC_REPO | sed 's/\*//'); do git branch -D $branch; done - git branch - - git fetch - git checkout $BASOP_CI_BRANCH_PC_REPO - git pull - cd - -- GitLab From 39392b4684fa6e1e0bc9f7efc9d236c9e8a887df Mon Sep 17 00:00:00 2001 From: norvell Date: Tue, 28 May 2024 13:53:35 +0000 Subject: [PATCH 5/6] Update .gitlab-ci.yml --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2663e794e..1882f9672 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -123,7 +123,8 @@ stages: .update-scripts-repo: &update-scripts-repo - cd $SCRIPTS_DIR - - git remote set-branches --add origin $BASOP_CI_BRANCH_PC_REPO + - sed -i '/fetch/d' .git/config # Remove all fetch lines to clean out dead links + - git remote set-branches --add origin $BASOP_CI_BRANCH_PC_REPO # Add currently used branch - for branch in $(git branch | grep -v $BASOP_CI_BRANCH_PC_REPO | sed 's/\*//'); do git branch -D $branch; done - git remote prune origin - git prune -- GitLab From 4ecc40e592656b92b1639b64cf7af54822452c2f Mon Sep 17 00:00:00 2001 From: norvell Date: Tue, 28 May 2024 13:56:35 +0000 Subject: [PATCH 6/6] Update .gitlab-ci.yml --- .gitlab-ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1882f9672..a5169958e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -125,10 +125,6 @@ stages: - cd $SCRIPTS_DIR - sed -i '/fetch/d' .git/config # Remove all fetch lines to clean out dead links - git remote set-branches --add origin $BASOP_CI_BRANCH_PC_REPO # Add currently used branch - - for branch in $(git branch | grep -v $BASOP_CI_BRANCH_PC_REPO | sed 's/\*//'); do git branch -D $branch; done - - git remote prune origin - - git prune - - git branch - git checkout $BASOP_CI_BRANCH_PC_REPO - git pull - cd - -- GitLab