Use different git diff command.
1 unresolved thread
1 unresolved thread
Closes #3401988
Merge request reports
Activity
413 413 script: 414 414 - export TARGET_BRANCH=${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}${CI_COMMIT_BRANCH} 415 415 - git fetch -vn --depth=$GIT_DEPTH origin "+refs/heads/$TARGET_BRANCH:refs/heads/$TARGET_BRANCH" 416 - export MODIFIED=`git diff --name-only refs/heads/$TARGET_BRANCH|while read r;do echo "$CI_PROJECT_DIR/$r";done|tr "\n" " "` 417 - echo $MODIFIED | tr ' ' '\n' | yarn --cwd=./core run -s spellcheck:core --no-must-find-files --file-list stdin 416 - git diff $CI_MERGE_REQUEST_DIFF_BASE_SHA --name-only|while read r;do echo "$CI_PROJECT_DIR/$r";done > $CI_PROJECT_DIR/modified.txt 417 - yarn --cwd=./core run -s spellcheck:core --no-must-find-files --file-list $CI_PROJECT_DIR/modified.txt - Comment on lines +416 to +417
We don't need a variable or temporary file at all? And sed is perhaps better than a while loop:
416 - git diff $CI_MERGE_REQUEST_DIFF_BASE_SHA --name-only|while read r;do echo "$CI_PROJECT_DIR/$r";done > $CI_PROJECT_DIR/modified.txt 417 - yarn --cwd=./core run -s spellcheck:core --no-must-find-files --file-list $CI_PROJECT_DIR/modified.txt 416 - git diff $CI_MERGE_REQUEST_DIFF_BASE_SHA --name-only | sed "s_^_$CI_PROJECT_DIR/_" | yarn --cwd=./core run -s spellcheck:core --no-must-find-files --file-list stdin It appears that dumping all the changed files into a
modified.txt
file is enough. We can then pass that file to thespellcheck:core
job.I tried the loop approach but this one seems better, as suggested by @mstrelan here: https://www.drupal.org/project/drupal/issues/3401988#comment-15403054
changed this line in version 8 of the diff
Applied suggestion given in https://www.drupal.org/project/drupal/issues/3401988#comment-15415218
added 48 commits
-
4804304a...19f0ef5c - 47 commits from branch
project:11.x
- 7d0fe850 - Merge branch drupal:11.x into 3401988-spell-checking-job-fails
-
4804304a...19f0ef5c - 47 commits from branch
Please register or sign in to reply