From 21db6309381e9cd0e3f49bde776d1f08ac33b2c2 Mon Sep 17 00:00:00 2001 From: andrewc Date: Tue, 24 Oct 2023 14:12:29 +1000 Subject: [PATCH] Trying different method of getting branch for libs push --- kibot-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kibot-ci.yml b/kibot-ci.yml index f52124a..3cce3d3 100644 --- a/kibot-ci.yml +++ b/kibot-ci.yml @@ -124,12 +124,12 @@ image: REPO=$(basename $(git remote get-url origin)) git remote set-url origin https://ci_push:$TOKEN@gitlab.com/Micromelon/education/hardware/$REPO git fetch --all - CURR_B=$(git name-rev --name-only $(git rev-parse HEAD)) + CURR_B=$(git branch --remote --verbose --no-abbrev --contains | sed -rne 's/^[^\/]*\/([^\ ]+).*$/\1/p') git rev-parse HEAD git branch git remote get-url origin echo $CURR_B - git checkout $CURR_B + git checkout origin/$CURR_B git commit --allow-empty -m "Merge" git push HEAD:$CURR_B -o merge_request.create -o merge_request.remove_source_branch=false -o merge_request.merge_when_pipeline_succeeds -o merge_request.target=master cd $CI_PROJECT_DIR