From 508d71180cf899aa5a18859a41432b89b19f7ee8 Mon Sep 17 00:00:00 2001 From: meihaiyi Date: Tue, 6 Aug 2024 03:31:35 +0800 Subject: [PATCH] chore: Update CircleCI pipeline to clone and checkout branch or tag using powershell.exe --- .circleci/continue_config.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.circleci/continue_config.yml b/.circleci/continue_config.yml index 84b27cfd..5789cbc5 100644 --- a/.circleci/continue_config.yml +++ b/.circleci/continue_config.yml @@ -37,14 +37,12 @@ jobs: command: | TAG="<< pipeline.git.tag >>" BRANCH="<< pipeline.git.branch >>" - declare -p TAG - declare -p BRANCH # If the branch is empty, use the tag as the branch - if [ -z "$BRANCH" ] || [ "$BRANCH" = " " ]; then - BRANCH=$TAG + if [ -z "\$BRANCH" ]; then + BRANCH=\$TAG fi - echo "Cloning $BRANCH branch" - git clone << pipeline.project.git_url >> --branch $BRANCH . + echo "Cloning \$BRANCH branch" + git clone << pipeline.project.git_url >> --branch \$BRANCH . - run: name: "Build Plugins & Run Tests" shell: powershell.exe