Add pre-commit hook for checking leaked Development Team.

CQTexperiment
Dzmitry Neviadomski 2021-04-05 20:31:25 +03:00
parent f1a8934ad9
commit 1c19046216
1 changed files with 11 additions and 0 deletions

11
.githooks/pre-commit Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
ERRORS=$(grep -nR --include project.pbxproj -E "(DevelopmentTeam|DEVELOPMENT_TEAM) =" . | grep -v -E '= (N6E749HJ2X|""|FK9S39L3SK)')
COUNT=$(echo -n "$ERRORS\c" | wc -l | awk '{print $1}')
if [ $COUNT -ne 0 ]; then
echo $COUNT
echo "Remove Development Team specifications from project files:"
echo "$ERRORS";
exit 1;
fi