Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit 7aab3bd

Browse files
[client] fix build target release/current (#889)
1 parent 2065d4b commit 7aab3bd

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

scripts/clone-opencti.sh

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,21 @@ clone_for_pr_build() {
6363

6464
clone_for_push_build() {
6565
echo "[CLONE-DEPS] Build from a commit, checking if a dedicated branch is required."
66-
BRANCH_PREFIX=$(echo $PR_BRANCH_NAME | cut -d "/" -f 1 | grep -c "opencti")
67-
if [[ "${BRANCH_PREFIX}" -eq "1" ]]
66+
if [[ ${PR_BRANCH_NAME} == "release/current" ]]
6867
then
69-
echo "[CLONE-DEPS] Dedicated OpenCTI branch found, using it"
70-
OPENCTI_BRANCH=$(echo $PR_BRANCH_NAME | cut -d "/" -f2-)
71-
git clone -b $OPENCTI_BRANCH https://github.com/OpenCTI-Platform/opencti.git
68+
echo "[CLONE-DEPS] Release OpenCTI branch found, using it"
69+
git clone -b $PR_BRANCH_NAME https://github.com/OpenCTI-Platform/opencti.git
7270
else
73-
echo "[CLONE-DEPS] No dedicated OpenCTI branch found, using master"
74-
git clone https://github.com/OpenCTI-Platform/opencti.git
71+
BRANCH_PREFIX=$(echo $PR_BRANCH_NAME | cut -d "/" -f 1 | grep -c "opencti")
72+
if [[ "${BRANCH_PREFIX}" -eq "1" ]]
73+
then
74+
echo "[CLONE-DEPS] Dedicated OpenCTI branch found, using it"
75+
OPENCTI_BRANCH=$(echo $PR_BRANCH_NAME | cut -d "/" -f2-)
76+
git clone -b $OPENCTI_BRANCH https://github.com/OpenCTI-Platform/opencti.git
77+
else
78+
echo "[CLONE-DEPS] No dedicated OpenCTI branch found, using master"
79+
git clone https://github.com/OpenCTI-Platform/opencti.git
80+
fi
7581
fi
7682
}
7783

0 commit comments

Comments
 (0)