Print colored diffs when there are formatting failures in CI
This makes diffs more readable in CI logs.
(cherry picked from commit 38424714b1
)
This commit is contained in:
parent
44bda5351c
commit
1b7d42c99e
|
@ -15,7 +15,7 @@ PY_FILES=$(find \( -path "./.git" \
|
|||
\) -print)
|
||||
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 [ ! -s patch.patch ] ; then
|
||||
|
|
|
@ -40,7 +40,7 @@ while IFS= read -rd '' f; do
|
|||
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 [ ! -s patch.patch ] ; then
|
||||
|
|
|
@ -44,7 +44,7 @@ while IFS= read -rd '' f; do
|
|||
perl -i -pe 's/\x20== true//g' "$f"
|
||||
done
|
||||
|
||||
git diff > patch.patch
|
||||
git diff --color > patch.patch
|
||||
|
||||
# If no patch has been generated all is OK, clean up, and exit.
|
||||
if [ ! -s patch.patch ] ; then
|
||||
|
|
Loading…
Reference in New Issue