mirror of
https://github.com/Vita3K/Vita3K.git
synced 2025-04-02 11:02:10 -04:00
14 lines
No EOL
437 B
Bash
Executable file
14 lines
No EOL
437 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
|
|
git fetch origin $GITHUB_BASE_REF:refs/remotes/origin/$GITHUB_BASE_REF
|
|
for f in $(git diff --diff-filter=AM --name-only origin/$GITHUB_BASE_REF 'vita3k/**.cpp' 'vita3k/**.h' 'tools/**.cpp' 'tools/**.h'); do
|
|
if [ "$(diff -u <(cat $f) <(clang-format $f))" != "" ]
|
|
then
|
|
echo "run format"
|
|
exit 1
|
|
fi
|
|
done
|
|
fi |