Print colored diffs when there are formatting failures in CI
This makes diffs more readable in CI logs.
This commit is contained in:
parent
353bb45e21
commit
38424714b1
@ -15,7 +15,7 @@ PY_FILES=$(find \( -path "./.git" \
|
|||||||
\) -print)
|
\) -print)
|
||||||
black -l 120 $PY_FILES
|
black -l 120 $PY_FILES
|
||||||
|
|
||||||
git diff > patch.patch
|
git diff --color > patch.patch
|
||||||
|
|
||||||
# If no patch has been generated all is OK, clean up, and exit.
|
# If no patch has been generated all is OK, clean up, and exit.
|
||||||
if [ ! -s patch.patch ] ; then
|
if [ ! -s patch.patch ] ; then
|
||||||
|
@ -40,7 +40,7 @@ while IFS= read -rd '' f; do
|
|||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
git diff > patch.patch
|
git diff --color > patch.patch
|
||||||
|
|
||||||
# If no patch has been generated all is OK, clean up, and exit.
|
# If no patch has been generated all is OK, clean up, and exit.
|
||||||
if [ ! -s patch.patch ] ; then
|
if [ ! -s patch.patch ] ; then
|
||||||
|
@ -42,7 +42,7 @@ while IFS= read -rd '' f; do
|
|||||||
perl -i -ple 's/\s*$//g' "$f"
|
perl -i -ple 's/\s*$//g' "$f"
|
||||||
done
|
done
|
||||||
|
|
||||||
git diff > patch.patch
|
git diff --color > patch.patch
|
||||||
|
|
||||||
# If no patch has been generated all is OK, clean up, and exit.
|
# If no patch has been generated all is OK, clean up, and exit.
|
||||||
if [ ! -s patch.patch ] ; then
|
if [ ! -s patch.patch ] ; then
|
||||||
|
Loading…
Reference in New Issue
Block a user