Created
June 7, 2013 02:51
-
-
Save wtsnz/5726768 to your computer and use it in GitHub Desktop.
Automatic iOS Deployments Bash Script
This file contains hidden or 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 | |
cd /Shared\ Items/Public/AUTO/project | |
BUILDDIR="/Shared Items/Public/AUTO/project_build" | |
NAME="Project" | |
CONFIGURATION="Ad Hoc" | |
API_TOKEN="..." | |
TEAM_TOKEN="..." | |
# Reset Git | |
echo resetting | |
git reset --hard | |
echo pulling latest | |
git pull | |
xcodebuild -workspace $NAME.xcworkspace -scheme $NAME -configuration $CONFIGURATION clean build ONLY_ACTIVE_ARCH=NO CONFIGURATION_BUILD_DIR="$BUILDDIR" | |
echo $? | |
echo Generating .ipa file | |
xcrun -sdk iphoneos PackageApplication -v "$BUILDDIR/$NAME.app" -o "$BUILDDIR/$NAME.ipa" | |
echo $? | |
# Zip the dSYM File | |
echo Generating zip file | |
/usr/bin/zip -r "$BUILDDIR/$NAME.app.dSYM.zip" "$BUILDDIR/$NAME.app.dSYM" | |
echo $? | |
# Upload the build to TestFlight | |
echo Sending to TestFlight | |
/usr/bin/curl "http://testflightapp.com/api/builds.json " -F file=@"$BUILDDIR/$NAME.ipa" -F dsym=@"$BUILDDIR/$NAME.app.dSYM.zip" -F api_token="$API_TOKEN" -F team_token="$TEAM_TOKEN" -F notes="Build uploaded automatically from Xcode." -# | |
echo $? | |
echo Done! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment