1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2026-01-19 06:30:54 +00:00

Merge branch 'fixGCCPreProcessScript' into 'master'

Fetch --unshallow in ubuntu_gcc_preprocess.sh

Closes #8900

See merge request OpenMW/openmw!5079
This commit is contained in:
Alexei Kotov 2026-01-04 03:53:08 +03:00
commit 9c221edd29

View file

@ -50,15 +50,16 @@ git remote add target "${CI_MERGE_REQUEST_PROJECT_URL:-https://gitlab.com/OpenMW
TARGET_BRANCH="${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-master}"
git fetch target "${TARGET_BRANCH:?}"
# Use unshallow to prevent error with git-merge-base: https://stackoverflow.com/a/78596539/22975246
git fetch --unshallow target "${TARGET_BRANCH:?}" || git fetch target "${TARGET_BRANCH:?}"
if [[ "${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}" ]]; then
git remote add source "${CI_MERGE_REQUEST_SOURCE_PROJECT_URL}"
git fetch --unshallow source "${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}"
git fetch --unshallow source "${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}" || git fetch source "${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}"
elif [[ "${CI_COMMIT_BRANCH}" ]]; then
git fetch origin "${CI_COMMIT_BRANCH:?}"
git fetch --unshallow origin "${CI_COMMIT_BRANCH:?}" || git fetch origin "${CI_COMMIT_BRANCH:?}"
else
git fetch origin
git fetch --unshallow origin || git fetch origin
fi
BASE_VERSION=$(git merge-base "target/${TARGET_BRANCH:?}" "${VERSION:?}")