mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-14 05:19:36 +00:00
6e0d67f9ec
* Check formatting in CI
* Move deleteDir() to cleanup section
* Revert "Move deleteDir() to cleanup section"
This reverts commit 4b0dd80cac
.
* Give up on check_format.txt
* Fix formatting
23 lines
502 B
Bash
Executable file
23 lines
502 B
Bash
Executable file
#!/bin/bash
|
|
|
|
STATUSOLD=`git status --porcelain`
|
|
./format.py -j
|
|
if [ $? -ne 0 ]
|
|
then
|
|
echo "Formatter failed. Exiting."
|
|
exit -1
|
|
fi
|
|
STATUSNEW=`git status --porcelain`
|
|
|
|
if [ "${STATUSOLD}" != "${STATUSNEW}" ];
|
|
then
|
|
echo ""
|
|
echo "Misformatted files found. Run ./format.py and verify codegen is not impacted."
|
|
echo ""
|
|
diff --unified=0 --label "Old git status" <(echo "${STATUSOLD}") --label "New git status" <(echo "${STATUSNEW}")
|
|
echo ""
|
|
echo "Exiting."
|
|
exit 1
|
|
fi
|
|
|
|
exit 0
|