Loading snippets/basop/get-float-ref-branch-name.sh +2 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ branchname_out="ivas-float-update" if ! [[ "$branchname_in" =~ $BASOP_PATTERN ]]; then printf "$MSG_DOES_NOT_MATCH" "$branchname_in" exit 1 fi # The float ref branch is just the same name, but with basop -> ref replacement Loading @@ -64,3 +65,4 @@ if [[ "$git_result" =~ "$float_ref_branchname" ]]; then fi echo "$branchname_out" exit 0 snippets/basop/set-float-reference-branches.sh +13 −5 Original line number Diff line number Diff line Loading @@ -7,11 +7,19 @@ cd "${CI_PROJECT_DIR}" # use ivas-float-update as reference for the merge source per default FLOAT_REF_BRANCH_MERGE_SOURCE=$FLOAT_REF_BRANCH exit_code=0 # first check if branch matches the pattern bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/get-float-ref-branch-name.sh $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME || exit_code=$? # run again to actually set the branch name only if the naming pattern is there # TODO: this is a bit awkward, but needed as a quick fix for now if [[ "$exit_code" != "0" ]]; then if [[ ! "$CI_MERGE_REQUEST_TITLE" =~ \[skip[[:space:]_-]name[[:space:]_-]check\] ]] && [[ ! "$CI_MERGE_REQUEST_TITLE" =~ \[CI\] ]]; then bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh # a bit awkward: write to file + standard out first so that the error message is visible in case of failure. Then fill the variable from the file bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/get-float-ref-branch-name.sh $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME | tee tmp_ref_branch.txt FLOAT_REF_BRANCH_MERGE_SOURCE=$(cat tmp_ref_branch.txt) fi fi export FLOAT_REF_BRANCH_MERGE_SOURCE Loading
snippets/basop/get-float-ref-branch-name.sh +2 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ branchname_out="ivas-float-update" if ! [[ "$branchname_in" =~ $BASOP_PATTERN ]]; then printf "$MSG_DOES_NOT_MATCH" "$branchname_in" exit 1 fi # The float ref branch is just the same name, but with basop -> ref replacement Loading @@ -64,3 +65,4 @@ if [[ "$git_result" =~ "$float_ref_branchname" ]]; then fi echo "$branchname_out" exit 0
snippets/basop/set-float-reference-branches.sh +13 −5 Original line number Diff line number Diff line Loading @@ -7,11 +7,19 @@ cd "${CI_PROJECT_DIR}" # use ivas-float-update as reference for the merge source per default FLOAT_REF_BRANCH_MERGE_SOURCE=$FLOAT_REF_BRANCH exit_code=0 # first check if branch matches the pattern bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/get-float-ref-branch-name.sh $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME || exit_code=$? # run again to actually set the branch name only if the naming pattern is there # TODO: this is a bit awkward, but needed as a quick fix for now if [[ "$exit_code" != "0" ]]; then if [[ ! "$CI_MERGE_REQUEST_TITLE" =~ \[skip[[:space:]_-]name[[:space:]_-]check\] ]] && [[ ! "$CI_MERGE_REQUEST_TITLE" =~ \[CI\] ]]; then bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh # a bit awkward: write to file + standard out first so that the error message is visible in case of failure. Then fill the variable from the file bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/get-float-ref-branch-name.sh $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME | tee tmp_ref_branch.txt FLOAT_REF_BRANCH_MERGE_SOURCE=$(cat tmp_ref_branch.txt) fi fi export FLOAT_REF_BRANCH_MERGE_SOURCE