PYTHON-3136 [DevOps] Resync-specs.sh removes ignored files from working tree (#878)

This commit is contained in:
Julius Park 2022-02-17 17:13:25 -08:00 committed by GitHub
parent f5eec45250
commit e6b65860f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,10 +56,14 @@ cpjson () {
cd "$SPECS"/source/$1
find . -name '*.json' | grep -Ev "${BLOCKLIST}" | cpio -pdm \
$PYMONGO/test/$2
printf "\nIgnored files for ${PWD}"
printf "\n%s\n" "$(diff <(find . -name '*.json' | sort) \
printf "\nIgnored files for ${PWD}\n"
IGNORED_FILES="$(printf "\n%s\n" "$(diff <(find . -name '*.json' | sort) \
<(find . -name '*.json' | grep -Ev "${BLOCKLIST}" | sort))" | \
sed -e '/^[0-9]/d' | sed -e 's|< ./||g'
sed -e '/^[0-9]/d' | sed -e 's|< ./||g' )"
printf "%s\n" $IGNORED_FILES
cd "$PYMONGO"/test/$2
printf "%s\n" $IGNORED_FILES | xargs git checkout master
}
for spec in "$@"