Created
February 5, 2015 17:48
-
-
Save langford/70c9c8c735eae310ef8d to your computer and use it in GitHub Desktop.
Build production, passing "FORCE_PROD" environment variable (which I pass to the preprocessor in my build scheme)
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/sh | |
OUTPUTDIR="$HOME/Desktop/The_App" | |
APPNAME="The_App" | |
SCHEME="The_App" | |
SRCROOT=`pwd` | |
APP_WORKSPACE="$SRCROOT/The_App.xcworkspace" | |
ARCHIVE_PATH="$OUTPUTDIR/$APPNAME-production.xcarchive" | |
rm -f "$OUTPUTDIR/$APPNAME-production.ipa" | |
mkdir -p $OUTPUTDIR | |
xcodebuild clean && xcodebuild -workspace "$APP_WORKSPACE" -scheme "$SCHEME" archive -archivePath "$ARCHIVE_PATH" FORCE_PROD=1 && xcodebuild -exportArchive -exportFormat ipa -archivePath "$ARCHIVE_PATH" -exportPath "$OUTPUTDIR/$APPNAME-production.ipa" -exportProvisioningProfile 'The_App Adhoc Prov File' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment