Commit cd170315 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'main' into kiene/warning-for-basop-porting-naming-check

parents 962cc6a2 4a44bc29
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -28,13 +28,15 @@
# 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.

set -euxo pipefail

float_ref_branchname="ivas-float-update"
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 $branchname_in >>/dev/null || exit_code_follows_naming_conventions=$?
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=$?
# if this branch follows the naming convetions, we can try to get the corresponding float MR branch
# if this branch does NOT follow the porting naming convention, the float ref is just ivas-float-update, so skip everything
if [[ "exit_code_follows_naming_conventions" == "0" ]]; then
if [[ "$exit_code_follows_naming_conventions" == "0" ]]; then
  float_ref_branchname=$(${CI_PROJECT_DIR}/ivas-codec-ci/snippets/basop/get-float-ref-branch-name.sh $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME)
fi

@@ -50,6 +52,9 @@ if [ $commits_behind_count -ne 0 ]; then
  exit 1
fi

# stop echoing from here on, this is anyway only dbg printout
set +x

# if we are up-to-date, store the commit SHA's for all branches
MERGE_TARGET_COMMIT="$(git rev-parse "origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME")"
echo "MERGE_TARGET_COMMIT is $MERGE_TARGET_COMMIT"
+2 −0
Original line number Diff line number Diff line
@@ -31,6 +31,8 @@
# NOTE: this does not check e.g. for float_ref_branchname actually existing and will silently return ivas-float-update if not
#       Use branch-follows-porting-naming-convention.sh for that

set -euxo pipefail

if [ $# -ne 1 ]; then
  echo "Usage: $0 <branchname>"
  exit 1