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

Merge branch 'lc3plus-ensure-no-code-changes-without-download' into 'main'

check for changes in lib_lc3plus without download

See merge request !94
parents 0f0f2597 5941a612
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -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: