Skip to content

Instantly share code, notes, and snippets.

@jlerner
jlerner / ArchiveHousekeeper.sh
Last active May 12, 2017 15:40
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