Created
July 11, 2014 12:49
-
-
Save anagromataf/de5fb3d58553f1ef9658 to your computer and use it in GitHub Desktop.
post-checkout-Hook for using Cocoa Pods together with the Xcode CI Server
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 | |
## | |
## Create a folder at /var/teamsserver/ and set the user and group to _teamsserver | |
## Copy this script to /Applications/Xcode.app/Contents/Developer/usr/share/git-core/templates/hooks/post-checkout | |
## | |
export LC_ALL="en_US.UTF-8" | |
export HOME="/var/teamsserver/" | |
echo "#### POD INSTALL ####" | |
echo "HOME: $HOME" | |
echo "USER: `whoami`" | |
echo "GROUPS: `groups`" | |
echo "######################" | |
if [ $1 = 0000000000000000000000000000000000000000 ]; then | |
old=4b825dc642cb6eb9a060e54bf8d69288fbee4904 | |
else | |
old=$1 | |
fi | |
if [ -f Podfile ] && command -v pod install >/dev/null && | |
git diff --name-only $old $2 | egrep -q '^Podfile$' | |
then | |
(unset GIT_DIR; exec pod install) | grep -v '^Using ' | grep -v ' is complete' | |
true | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment