From e5358000efd9818411056237685ff60f1e51d29d Mon Sep 17 00:00:00 2001 From: andrewc Date: Tue, 24 Oct 2023 15:33:39 +1000 Subject: [PATCH] Trying changing submodule url in push libs job, before updating with remote --- kibot-ci.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/kibot-ci.yml b/kibot-ci.yml index ff81d0a..691b1f7 100644 --- a/kibot-ci.yml +++ b/kibot-ci.yml @@ -16,12 +16,6 @@ stages: - gen_fab - release -default: - before_script: - - git submodule update --init --remote --merge - - git submodule status - - git submodule foreach git log -1 - image: name: ghcr.io/inti-cmnb/kicad7_auto:1.6.3 @@ -117,7 +111,6 @@ image: if [[ $GITLAB_CI == 'true' && $CI_COMMIT_BRANCH == "main" ]]; then git config --global user.name "KicadCi" git config --global user.email "andrew@micromelon.com.au" - cd $CI_PROJECT_DIR for d in "libs/melonlib" "libs/melon3d" do cd $d @@ -128,8 +121,16 @@ image: TOKEN=$KI_LIB_3D_TOKEN fi REPO=$(basename $(git remote get-url origin)) - git remote set-url origin https://ci_push:$TOKEN@gitlab.com/Micromelon/education/hardware/$REPO - git fetch origin + cd $CI_PROJECT_DIR + git submodule set-url $d https://ci_push:$TOKEN@gitlab.com/Micromelon/education/hardware/$REPO + done + git submodule update --init --remote --merge + git submodule status + git submodule foreach git log -1 + cd $CI_PROJECT_DIR + for d in "libs/melonlib" "libs/melon3d" + do + cd $d CURR_B=$(git branch --remote --verbose --no-abbrev --contains | sed -rne 's/^[^\/]*\/([^\ ]+).*$/\1/p') git rev-parse HEAD git branch -a