Skip to content

Instantly share code, notes, and snippets.

@jlerner
Last active May 12, 2017 15:40
Show Gist options
  • Save jlerner/5d58b47d0950211809c90ce88112e483 to your computer and use it in GitHub Desktop.
Save jlerner/5d58b47d0950211809c90ce88112e483 to your computer and use it in GitHub Desktop.
Prevent Xcode Archive build when git working copy is dirty
#!/bin/sh
# Based on http://stackoverflow.com/a/7098618/106465
if [ -z "$(git status --porcelain)" ]; then
echo "Working directory clean, proceeding"
else
echo "error: Working directory dirty, stopping build"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment