Target test files only in git diff check

Change-Id: I758636bc1669c1618b41db9e672664fedfc7b65a
Co-Authored-By: Francis Yi <francisyi19@gmail.com>
Co-Authored-By: Ian Pittwood <pittwoodian@gmail.com>
This commit is contained in:
Ian H. Pittwood 2020-03-10 13:18:15 -05:00 committed by Francis Yi
parent d155be2145
commit 388dcc0517

View File

@ -16,7 +16,7 @@
git update-index -q --ignore-submodules --refresh git update-index -q --ignore-submodules --refresh
# Evaluate git files for difference, if found print message and fail. # Evaluate git files for difference, if found print message and fail.
git diff-files --quiet --ignore-submodules git diff-files --quiet --ignore-submodules **/*.golden
if [ $? -ne 0 ] if [ $? -ne 0 ]
then then
echo "git diff found modified test cases, please run make update-golden" echo "git diff found modified test cases, please run make update-golden"
@ -24,7 +24,7 @@ then
fi fi
# Evaluate git index for differences, if found print message and fail. # Evaluate git index for differences, if found print message and fail.
git diff-index --cached --quiet --ignore-submodules HEAD -- git diff-index --cached --quiet --ignore-submodules HEAD -- **/*.golden
if [ $? -ne 0 ] if [ $? -ne 0 ]
then then
echo "git diff found modified test cases, please run make update-golden" echo "git diff found modified test cases, please run make update-golden"