diff --git a/main-float.yml b/main-float.yml index a84056a518879f845d0bb00ce1d245d0a01a35db..3faeb3b6e8ad03322768f40868c92a0a0968a396 100644 --- a/main-float.yml +++ b/main-float.yml @@ -1041,12 +1041,18 @@ lc3plus-ensure-no-code-changes: needs: [] timeout: "5 minutes" script: - # Replace code commited to repo with code downloaded from ETSI - - ./scripts/lc3plus_lib_setup/get_lc3plus.sh + - echo $CI_MERGE_REQUEST_TITLE > tmp.txt + - lc3plus_update_flag=$(grep -c --ignore-case "\[lc3plus[ -]update\]" tmp.txt) || true + + - git_diff_return_code=0 + - git diff --name-only --exit-code $CI_MERGE_REQUEST_TARGET_BRANCH_NAME -- lib_lc3plus || git_diff_return_code=$? - # Ensure git reports no changes - - modified_files=$(git status -su lib_lc3plus) - - if [[ $modified_files ]]; then printf 'LC3plus codebase was modified!\n\n'"$modified_files"'\n\n'; exit $EXIT_CODE_FAIL; fi + - | + if [ $git_diff_return_code != 0 ] && [ $lc3plus_update_flag == 0 ]; then + echo "Your MR modifies lib_lc3plus. That should not be done. If this MR is meant to update to a new LC3plus version, add '[lc3plus-update]' to your MR title." + exit 1 + fi + - exit 0 check-bitexactness-hrtf-rom-and-file: extends: