Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions scripts/clone-opencti.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down