Skip to content

Commit

Permalink
[Git Hooks] Fix hook to ignore submodule projects
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
kode54 committed Jun 10, 2022
1 parent 6bd0bf1 commit bca1b02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

MATCHES=$(grep -nR --include project.pbxproj -E "(DevelopmentTeam|DEVELOPMENT_TEAM) =" .)
COUNT=$(echo -n "$MATCHES\c" | grep -cvE '= ""')
MATCHES=$(git grep -n -E "(DevelopmentTeam|DEVELOPMENT_TEAM) =" .)
COUNT=$(echo -n "$MATCHES\c" | grep -cvE '(Shared.xcconfig|= "")')

if [ $COUNT -ne 0 ]; then
ERRORS=$(echo -n "$MATCHES\c" | grep -vE '= ""')
Expand Down

0 comments on commit bca1b02

Please sign in to comment.