Created
May 5, 2017 14:57
-
-
Save ndizazzo/7add514dd59243f352049c1278c61091 to your computer and use it in GitHub Desktop.
Abort commit if snapshot tests are left on
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROJ_PREFIX='*-ios' | |
function projroot() | |
{ | |
while [[ $PWD != '/' && ${PWD##*/} != $PROJ_PREFIX ]]; do cd ..; done | |
} | |
projroot | |
if test $(grep -R "self.recordMode = true" ./*SnapshotTests | wc -c) != 0 ; then | |
echo "You have left record mode on in this commit!" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment