Skip to content

Commit 064a2cb

Browse files
committed
Add check for source file changes that would impact CMakeLists.txt
1 parent 5b2e9c6 commit 064a2cb

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

scripts/soundness.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,17 @@ if [ "$out" == *"error"* ]; then
4848
exit 1
4949
fi
5050
if [[ "$FIRST_OUT" != "$SECOND_OUT" ]]; then
51-
printf "\033[0;31mRunning gyb results in changes! Have you manually editted the generated swift files? Or did you forget to run gyb and commit changes?\033[0m\n"
51+
printf "\033[0;31mRunning gyb results in changes! Have you manually edited the generated Swift files? Or did you forget to run gyb and commit changes?\033[0m\n"
52+
exit 1
53+
fi
54+
printf "\033[0;32mokay.\033[0m\n"
55+
56+
printf "=> Detecting changes in source files for CMake build\n"
57+
FIRST_OUT="$(git status --porcelain)"
58+
out=$($here/update_cmakelists.sh 2>&1)
59+
SECOND_OUT="$(git status --porcelain)"
60+
if [[ "$FIRST_OUT" != "$SECOND_OUT" ]]; then
61+
printf "\033[0;31mThere are source file changes! Have you added or renamed source files? Or did you forget to run 'update_cmakelists.sh' and commit changes?\033[0m\n"
5262
exit 1
5363
fi
5464
printf "\033[0;32mokay.\033[0m\n"

0 commit comments

Comments
 (0)