Created
February 14, 2015 00:50
-
-
Save bradjasper/b2af4762756a5df20524 to your computer and use it in GitHub Desktop.
Build, Archive & Export Mac App from command line (rather than Xcode)
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 | |
BASE_DIR=$HOME/Projects/focus | |
BUILD_DIR=$BASE_DIR/Builds | |
FOCUS_ARCHIVE=$BUILD_DIR/Focus.xcarchive | |
FOCUS_APP=$BUILD_DIR/Focus.app | |
echo "Building Focus..." | |
echo "Cleaning up old archive & app..." | |
rm -rf $FOCUS_ARCHIVE $FOCUS_APP | |
echo "Building archive..." | |
xcodebuild -workspace $BASE_DIR/Focus.xcworkspace -config Release -scheme Focus -archivePath $FOCUS_ARCHIVE archive | |
echo "Exporting archive..." | |
xcodebuild -archivePath $FOCUS_ARCHIVE -exportArchive -exportPath $FOCUS_APP -exportFormat app | |
echo "Cleaning up archive..." | |
rm -rf $FOCUS_ARCHIVE | |
echo "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment