From b32c435540d999c893dd323f09398ce8e0df0baf Mon Sep 17 00:00:00 2001 From: Jeremy Cloarec Date: Fri, 25 Apr 2025 11:46:53 +0200 Subject: [PATCH] [client] test fix build target release/current --- scripts/clone-opencti.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/scripts/clone-opencti.sh b/scripts/clone-opencti.sh index 5493d8950..88ac10ddd 100644 --- a/scripts/clone-opencti.sh +++ b/scripts/clone-opencti.sh @@ -63,15 +63,21 @@ clone_for_pr_build() { clone_for_push_build() { echo "[CLONE-DEPS] Build from a commit, checking if a dedicated branch is required." - BRANCH_PREFIX=$(echo $PR_BRANCH_NAME | cut -d "/" -f 1 | grep -c "opencti") - if [[ "${BRANCH_PREFIX}" -eq "1" ]] + if [[ ${PR_BRANCH_NAME} == "release/current" ]] then - echo "[CLONE-DEPS] Dedicated OpenCTI branch found, using it" - OPENCTI_BRANCH=$(echo $PR_BRANCH_NAME | cut -d "/" -f2-) - git clone -b $OPENCTI_BRANCH https://github.com/OpenCTI-Platform/opencti.git + echo "[CLONE-DEPS] Release OpenCTI branch found, using it" + git clone -b $PR_BRANCH_NAME https://github.com/OpenCTI-Platform/opencti.git else - echo "[CLONE-DEPS] No dedicated OpenCTI branch found, using master" - git clone https://github.com/OpenCTI-Platform/opencti.git + BRANCH_PREFIX=$(echo $PR_BRANCH_NAME | cut -d "/" -f 1 | grep -c "opencti") + if [[ "${BRANCH_PREFIX}" -eq "1" ]] + then + echo "[CLONE-DEPS] Dedicated OpenCTI branch found, using it" + OPENCTI_BRANCH=$(echo $PR_BRANCH_NAME | cut -d "/" -f2-) + git clone -b $OPENCTI_BRANCH https://github.com/OpenCTI-Platform/opencti.git + else + echo "[CLONE-DEPS] No dedicated OpenCTI branch found, using master" + git clone https://github.com/OpenCTI-Platform/opencti.git + fi fi }