Created
March 12, 2015 07:50
-
-
Save michaelochs/76ccbb6c63455e9cb14c to your computer and use it in GitHub Desktop.
A git post checkout hook that ensures your pods are up to date. If there are no changes in the pods environment, this script does nothing.
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
#!/bin/sh | |
diff "Podfile.lock" "Pods/Manifest.lock" > /dev/null | |
if [[ $? != 0 ]] ; then | |
echo 'CocoaPods needs some more clean up...' | |
echo 'Quit iOS simulator...' | |
osascript -e 'tell app "iPhone Simulator" to quit' | |
echo 'Quit Xcode...' | |
osascript -e 'tell app "Xcode" to quit' | |
pod install | |
# echo 'Clean derived data folder...' | |
# rm -rf ~/Library/Developer/Xcode/DerivedData/* | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment