Skip to content

Commit 05b1b2c

Browse files
committed
Adjust way to get changed files
1 parent 368851d commit 05b1b2c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.circleci/config.continue.yml.j2

+2-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ commands:
167167
if [[ "$BRANCH" != "master" ]] && [[ "$BRANCH" != "release/*" ]]; then
168168
# We know that we have checked out the PR merge branch, so the HEAD commit is a merge
169169
# As a backup, if anything goes wrong with the diff, the build will fail
170-
CHANGED_FILES=$(git show HEAD | grep -e "^Merge:" | cut -d ' ' -f 2- | sed 's/ /.../' | xargs git diff --name-only)
170+
# Get list of changed files directly using git diff-tree to avoid issues with large binary files
171+
CHANGED_FILES=$(git diff-tree --no-commit-id --name-only -r HEAD)
171172
# Count the number of matches, and ignore if the grep doesn't match anything
172173
MATCH_COUNT=$(echo "$CHANGED_FILES" | grep -c -E "<< pipeline.parameters.global_pattern >>|<< parameters.pattern >>") || true
173174
if [[ "$MATCH_COUNT" -eq "0" ]]; then

0 commit comments

Comments
 (0)