Skip to content

Instantly share code, notes, and snippets.

@jkubicek
Created February 7, 2012 15:59
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 jkubicek/1760389 to your computer and use it in GitHub Desktop.
Save jkubicek/1760389 to your computer and use it in GitHub Desktop.
iOS build script
#!/bin/sh
WORKSPACE="$(pwd)/XXXXX.xcodeproj/project.xcworkspace"
CONFIG="Release"
SCHEME="Release"
SDK="iphoneos5.0"
TARGET="XXXXX"
BUILDDIR="$(pwd)/build/Release-iphoneos"
APPNAME="XXXXX"
DEVELOPER_NAME="iPhone Distribution: XXXXX"
PROVISIONING_PROFILE="$(pwd)/Provisioning/XXXXX.mobileprovision"
xcodebuild -alltargets clean
xcodebuild -sdk "$SDK" -configuration "$CONFIG"
xcrun -sdk iphoneos PackageApplication -v "$BUILDDIR/$APPNAME.app" -o "$(pwd)/$APPNAME.ipa" -sign "$DEVELOPER_NAME" -embed "$PROVISIONING_PROFILE"
API_TOKEN="XXXXX"
TEAM_TOKEN="XXXXX"
RELEASE_NOTES="$(git show -s --format=%s)"
rm -rf "$BUILDDIR/$APPNAME.app.dSYM.zip"
zip -r -9 "$BUILDDIR/$APPNAME.app.dSYM.zip" "$BUILDDIR/$APPNAME.app.dSYM"
curl http://testflightapp.com/api/builds.json \
-F file="@$(pwd)/$APPNAME.ipa" \
-F dsym="@$BUILDDIR/$APPNAME.app.dSYM.zip" \
-F api_token="$API_TOKEN" \
-F team_token="$TEAM_TOKEN" \
-F notes='This build was uploaded via the upload API' \
-F distribution_lists='XXXXX' \
-v --http1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment