Skip to content

Instantly share code, notes, and snippets.

@yosimasu
Created January 18, 2013 06:38
Show Gist options
  • Save yosimasu/4562802 to your computer and use it in GitHub Desktop.
Save yosimasu/4562802 to your computer and use it in GitHub Desktop.
#!/bin/sh
PROJDIR=`pwd`
PROJECT_NAME="XXXX"
PROJECT_BUILDDIR="${PROJDIR}/build/Release-iphoneos"
BUILD_HISTORY_DIR="${PROJDIR}/build/${PROJECT_NAME}.build"
CODE_SIGN_IDENTITY="iPhone Distribution: XXXX"
DEVELOPPER_NAME="iPhone Distribution: XXXX"
PROVISONNING_PROFILE="${PROJDIR}/XXXX.mobileprovision"
echo Building Project
rm -rf build
xcodebuild -project ${PROJECT_NAME}.xcodeproj -configuration Release -sdk iphoneos clean build
#Check if build succeeded
if [ $? != 0 ]
then
exit 1
fi
/usr/bin/xcrun -sdk iphoneos PackageApplication -v "${PROJECT_BUILDDIR}/${PROJECT_NAME}.app" -o "${PROJECT_BUILDDIR}/${PROJECT_NAME}.ipa" --sign "${DEVELOPPER_NAME}" --embed "${PROVISONNING_PROFILE}"
cp ${PROVISONNING_PROFILE} ${PROJECT_BUILDDIR}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment