Skip to content

Instantly share code, notes, and snippets.

@litso
Forked from kylef/post-checkout.sh
Created April 4, 2014 03:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save litso/9967450 to your computer and use it in GitHub Desktop.
Save litso/9967450 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
### CocoaPods git-checkout hook
#
# This is a hook which you can install, it will automatically
# run `pod install` when you do a git pull/clone/checkout.
#
# The hook can be used to make CocoaPods usable with Xcode CI.
#
## Installation
#
# This git post-checkout hook can be installed by running the
# following command. Note, you will need to re-install this
# everytime you update Xcode.
#
# $ [sudo] curl -o /Applications/Xcode.app/Contents/Developer/usr/share/git-core/templates/hooks/post-checkout https://gist.github.com/kylef/7250271/raw/post-checkout.sh
# $ [sudo] chmod +x /Applications/Xcode.app/Contents/Developer/usr/share/git-core/templates/hooks/post-checkout
#
if [ -r Podfile ] ; then
env -i HOME=/Library/Server/Xcode PATH=$PATH pod install
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment