Last active
August 29, 2015 13:55
-
-
Save stigi/8706344 to your computer and use it in GitHub Desktop.
A simple git hook that let's you know whenever you need to update your CocoaPods after merging or pulling from a remote.
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/bash | |
# | |
# Let's you know when your pods should be updated right after a git pull or git merge | |
# Also works for fast-forward pulls. | |
# | |
# To enable this hook for your project, save it as .git/hooks/post-merge | |
diff "Podfile.lock" "Pods/Manifest.lock" > /dev/null | |
if [ $? != 0 ] ; then | |
echo | |
echo "[COCOAPODS] The sandbox is not in sync with the Podfile.lock." | |
echo " Run 'pod install' or update your CocoaPods installation." | |
echo | |
#pod install # uncomment this line to update the pods whenever necessary | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why /bin/bash? /bin/sh should do fine