Fixing CI Changed_Files #1226

Merged
nupplaphil merged 1 commit from bug/fix_check into 2021.12-rc 2022-01-07 10:17:54 +01:00

View file

@ -55,7 +55,12 @@ pipeline:
image: friendicaci/php-cs image: friendicaci/php-cs
commands: commands:
- cd addon/ - cd addon/
- export CHANGED_FILES="$(git diff --name-status ${CI_PREV_COMMIT_SHA}..${CI_COMMIT_SHA} | grep ^A | cut -f2 | sed -e "s/^/addon\\//")" - if [ ! -z "$${CI_COMMIT_PULL_REQUEST}" ]; then
git fetch --no-tags origin ${CI_COMMIT_TARGET_BRANCH};
export CHANGED_FILES="$(git diff --name-status $(git merge-base FETCH_HEAD origin/${CI_COMMIT_TARGET_BRANCH})..${CI_COMMIT_SHA} | grep ^A | cut -f2 | sed -e "s/^/addon\\//")";
else
export CHANGED_FILES="$(git diff --name-status ${CI_COMMIT_SHA} | grep ^A | cut -f2 | sed -e "s/^/addon\\//")";
fi
- cd ../ - cd ../
- /check-php-cs.sh - /check-php-cs.sh
when: when: