Skip to content

Instantly share code, notes, and snippets.

@thomsmed
Last active June 25, 2023 10:43
Show Gist options
  • Select an option

  • Save thomsmed/8826720a35aa5f17bd777876afdc0f93 to your computer and use it in GitHub Desktop.

Select an option

Save thomsmed/8826720a35aa5f17bd777876afdc0f93 to your computer and use it in GitHub Desktop.
avoid-developer-team-pre-commit.sh - A simple shell script that makes sure no DEVELOPMENT_TEAM is set in Xcode project files.
#!/bin/sh
#
# Find all project.pbxproj files with staged changes and make sure they do not specify any DEVELOPMENT_TEAM.
matches=$(git grep --cached -E -o 'DEVELOPMENT_TEAM = .{3,};$')
if [ ! -z "${matches}" ]; then
echo "One or more project files specify DEVELOPMENT_TEAM:"
echo "$matches"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment