Skip to content

Instantly share code, notes, and snippets.

@irshadpc
Created March 22, 2017 06:33
Show Gist options
  • Save irshadpc/ab4d6da3f277689eb97be0ba39a14b01 to your computer and use it in GitHub Desktop.
Save irshadpc/ab4d6da3f277689eb97be0ba39a14b01 to your computer and use it in GitHub Desktop.
#!/bin/sh
# build.sh
#
# Created by IRSHAD PC on 10/02/17.
# Copyright © 2017 IRSHAD PC. All rights reserved.
PROJDIR=${WORKSPACE}/___PROJECT NAME___
PROJECT_NAME=___XCODE PROJECT NAME___
TARGET_SDK="iphonesimulator4.0"
PROJECT_BUILDDIR="${PROJDIR}/build/Release-iphoneos"
TARGET_TEST_NAME="UnitTests"
BUILD_HISTORY_DIR="/Users/barbu/Desktop"
DEVELOPPER_NAME="iPhone Developer:"
PROVISONNING_PROFILE = "/Users/barbu/Desktop/desire.mobileprovision"
# compile project
echo Building Project
cd "${PROJDIR}"
xcodebuild -target "${PROJECT_NAME}" -sdk "${TARGET_SDK}" -configuration Release
#Check if build succeeded
if [ $? != 0 ]
then
exit 1
fi
/usr/bin/xcrun -sdk iphoneos PackageApplication -v "${PROJECT_BUILDDIR}/${APPLICATION_NAME}.app" -o "${BUILD_HISTORY_DIR}/${APPLICATION_NAME}.ipa" --sign "${DEVELOPPER_NAME}" --embed "${PROVISONNING_PROFILE}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment