From fc0cbc31475ac26cd041ded2a660ea4789bd48f2 Mon Sep 17 00:00:00 2001 From: Robert Schmidt <robert.schmidt@openairinterface.org> Date: Tue, 1 Oct 2024 08:46:06 +0200 Subject: [PATCH] Create_Workspace: exit 0 at end the create_workspace.sh script checks if a branch should be merged into what we are trying to checkount (i.e., typically develop into feature-branch). The problem is that it uses a short-hand for an if branch. [ -n "${merge}"] && git merge... If we don't request a merge, [ -n XX ] will evalute to 1, and not do the git merge. Since it's the last command in the script, this makes the script return 1 (failure), when it actually succeeded. Add exit 0 to ensure we return 0 after successful end of the script. If there is a failure, the script will terminate early. It can be tested by e.g., giving a wrong commit ID. Reviewed-by: Jaroslava Fiedlerova <Jaroslava.Fiedlerova@openairinterface.org> --- ci-scripts/scripts/create_workspace.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci-scripts/scripts/create_workspace.sh b/ci-scripts/scripts/create_workspace.sh index 0dd1f3aca7d..925f606b160 100755 --- a/ci-scripts/scripts/create_workspace.sh +++ b/ci-scripts/scripts/create_workspace.sh @@ -23,3 +23,4 @@ git config advice.detachedHead false mkdir -p cmake_targets/log git checkout -f ${ref} [ -n "${merge}" ] && git merge --ff ${merge} -m "Temporary merge for CI" +exit 0 -- GitLab