mirror of
https://github.com/zeldaret/mm.git
synced 2024-11-23 21:09:52 +00:00
57a9fb7b34
* Added tools/check_format.sh. * Exit nonzero from format.sh if clang-format-11 not installed. * Replace which with command -v. * Fail check_format.sh if format.sh fails. * Improve Jenkinsfile. * Take exit 0 out of else in check_format.sh. * Format flg_set.c to test new Jenkins environment. * Fix formatter failed logic in check_format.sh. * Format all misformatted files in master. * Remove Summarize Problems stage from Jenkins. I didn't realize Jenkins would not a run a subsequent stage if a previous stage errored. This defeats the purpose of summarizing all problems at the end, since this will only happen if there *are* no problems. * Use Post->Failure block to print all logs instead. * Remove spurious semicolon in arms_hook.
24 lines
499 B
Bash
Executable File
24 lines
499 B
Bash
Executable File
#!/bin/bash
|
|
|
|
STATUSOLD=`git status --porcelain`
|
|
./format.sh
|
|
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.sh 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
|