mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 16:44:48 -07:00
CI: Print colored diff for lint check (#6975)
* print colored diff in gha * use spaces
This commit is contained in:
parent
20cdcdb382
commit
dc152e89f7
2 changed files with 6 additions and 26 deletions
|
|
@ -13,17 +13,9 @@ fi
|
|||
# Check formatting using format.sh
|
||||
echo "Checking your code using format.sh..."
|
||||
|
||||
diff="$(./format.sh --diff --cmake --shell --print-version --branch origin/master)"
|
||||
./format.sh --color-diff --cmake --shell --print-version --branch origin/master
|
||||
err=$?
|
||||
|
||||
sep="
|
||||
----------
|
||||
"
|
||||
used_version="${diff%%"$sep"*}"
|
||||
diff="${diff#*"$sep"}"
|
||||
changes_to_make="${diff%%"$sep"*}"
|
||||
files_to_edit="${diff#*"$sep"}"
|
||||
|
||||
case $err in
|
||||
1)
|
||||
cat <<EOM
|
||||
|
|
@ -36,19 +28,10 @@ case $err in
|
|||
*** Then commit and push those changes to this branch. ***
|
||||
*** Check our CONTRIBUTING.md file for more details. ***
|
||||
*** ***
|
||||
*** Thank you ❤️ ***
|
||||
*** Thank you ❤️ ***
|
||||
*** ***
|
||||
***********************************************************
|
||||
|
||||
Used version:
|
||||
$used_version
|
||||
|
||||
Affected files:
|
||||
$files_to_edit
|
||||
|
||||
The following changes should be made:
|
||||
$changes_to_make
|
||||
|
||||
Exiting...
|
||||
EOM
|
||||
exit 2
|
||||
|
|
@ -65,9 +48,6 @@ EOM
|
|||
*** ***
|
||||
***********************************************************
|
||||
|
||||
Used version:
|
||||
$used_version
|
||||
|
||||
Exiting...
|
||||
EOM
|
||||
exit 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue