[Git Hooks] Fix hook to ignore submodule projects

Submodule projects are sometimes out of my control, so I shouldn't have
to deal with team identifiers in projects that don't affect my build
process in any meaningful way. The only way to deal with this would be
to fork and modify every project I touch that contains this stuff. No.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
Christopher Snowhill 2022-06-09 18:55:21 -07:00
parent 6bd0bf1dc5
commit bca1b02dc4

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
MATCHES=$(grep -nR --include project.pbxproj -E "(DevelopmentTeam|DEVELOPMENT_TEAM) =" .) MATCHES=$(git grep -n -E "(DevelopmentTeam|DEVELOPMENT_TEAM) =" .)
COUNT=$(echo -n "$MATCHES\c" | grep -cvE '= ""') COUNT=$(echo -n "$MATCHES\c" | grep -cvE '(Shared.xcconfig|= "")')
if [ $COUNT -ne 0 ]; then if [ $COUNT -ne 0 ]; then
ERRORS=$(echo -n "$MATCHES\c" | grep -vE '= ""') ERRORS=$(echo -n "$MATCHES\c" | grep -vE '= ""')