Commit 0f0f2597 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'branch-naming-check-revise' into 'main'

remove check for branch name conforming to porting conventions

See merge request !92
parents 14d92e69 d1a25b17
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -32,17 +32,10 @@ set -euxo pipefail

float_ref_branchname_in_ivas_codec="main"

# if the branch follows the naming conventions for parallel MRs and there is a branch of the same name in the float repo, set that branch as the float ref
# otherwise we default to main

exit_code_follows_naming_conventions=0
# if branch does not follow the convention, there will be a printout which is irrelevant here, so redirect it to null
bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/branch-follows-porting-naming-convention.sh $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME >>/dev/null || exit_code_follows_naming_conventions=$?

exit_code_companion_branch_exists=0
bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/check-for-parallel-branch-in-float-repo.sh || exit_code_companion_branch_exists=$?

if [[ "$exit_code_follows_naming_conventions" == "0" ]] && [[ "$exit_code_companion_branch_exists" == "0" ]]; then
if [[ "$exit_code_companion_branch_exists" == "0" ]]; then
  float_ref_branchname_in_ivas_codec=$CI_COMMIT_REF_NAME
fi

+2 −10
Original line number Diff line number Diff line
@@ -28,21 +28,13 @@
# accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and
# the United Nations Convention on Contracts on the International Sales of Goods.

MSG_NO_FLOAT_REF_BRANCH_FOUND="Your branch name %s conforms to the naming convention for parallel work on float and basop, but there is no corresponding branch of the same name in ivas-codec.
If this is intended (no changes on ivas-codec main), simply ignore this warning.
MSG_NO_FLOAT_REF_BRANCH_FOUND="There is no corresponding branch of the same name in ivas-codec, so no parallel float MR branch for this branch was found.
If this is intended (no parallel changes on ivas-codec main), simply ignore this warning.
If there should be a float ref branch for this MR, please check your spelling on your other branch and make sure that you pushed it.\n
"

set -euxo pipefail

exit_code_is_porting_mr=0
bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/branch-follows-porting-naming-convention.sh "$CI_COMMIT_REF_NAME" || exit_code_is_porting_mr=$?

# if this does not look like a porting branch, finish with success here - no need to check for a float companion
if [ "$exit_code_is_porting_mr" == "1" ]; then
  exit 0
fi

# if this does indeed look like a porting branch, get the float companion branch - if that is the default, then warn about possible typo/missing branch
float_ref_branchname=$CI_COMMIT_REF_NAME