Commit 53dbbdc6 authored by catch's avatar catch
Browse files

Issue #3387400 by andypost, longwave, catch: GitlabCI should fetch less from git

(cherry picked from commit e0eb2312)
parent e06ee7a6
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ variables:
  # Let composer know what self.version means.
  COMPOSER_ROOT_VERSION: "${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}${CI_COMMIT_BRANCH}-dev"
  CONCURRENCY: 32
  GIT_DEPTH: "3"

################
# Stages
+3 −2
Original line number Diff line number Diff line
@@ -250,8 +250,9 @@ stages:
  <<: [ *with-yarn-cache, *default-job-settings ]
  stage: 🪄 Lint
  script:
    - git fetch origin
    - export MODIFIED=`git diff --name-only origin/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}${CI_COMMIT_BRANCH}|while read r;do echo "$CI_PROJECT_DIR/$r";done|tr "\n" " "`
    - export TARGET_BRANCH=${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}${CI_COMMIT_BRANCH}
    - git fetch -vn --depth=$GIT_DEPTH "${CI_MERGE_REQUEST_PROJECT_URL:-origin}" "+refs/heads/$TARGET_BRANCH:refs/heads/$TARGET_BRANCH"
    - export MODIFIED=`git diff --name-only refs/heads/$TARGET_BRANCH|while read r;do echo "$CI_PROJECT_DIR/$r";done|tr "\n" " "`
    - echo $MODIFIED | tr ' ' '\n' | yarn --cwd=./core run -s spellcheck:core --no-must-find-files --file-list stdin

################