You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2013/04/25 15:42:55 UTC
[02/11] ios commit: [CB-2931] Tweak ./cordova/build project-level
script for iOS
[CB-2931] Tweak ./cordova/build project-level script for iOS
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/dd3cd02e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/dd3cd02e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/dd3cd02e
Branch: refs/heads/master
Commit: dd3cd02eaaf6746b8b1504ded75e914717b659fb
Parents: 8e4c49e
Author: Shazron Abdullah <sh...@apache.org>
Authored: Tue Apr 23 17:35:58 2013 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu Apr 25 06:32:26 2013 -0700
----------------------------------------------------------------------
bin/templates/project/cordova/build | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/dd3cd02e/bin/templates/project/cordova/build
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/build b/bin/templates/project/cordova/build
index 1574c5e..fae1a0b 100755
--- a/bin/templates/project/cordova/build
+++ b/bin/templates/project/cordova/build
@@ -43,9 +43,23 @@ cd "$PROJECT_PATH"
APP=build/$PROJECT_NAME.app
SDK=`xcodebuild -showsdks | grep Sim | tail -1 | awk '{print $6}'`
-xcodebuild -project $PROJECT_NAME.xcodeproj -arch i386 -target $PROJECT_NAME -configuration Debug -sdk $SDK clean build VALID_ARCHS="i386" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build"
-
-
+FLAG=${1:---debug}
+OTHER_FLAGS=$2
+CONFIGURATION=Debug
+if [ "$FLAG" == "--release" ]; then
+ CONFIGURATION=Release
+elif [ "$FLAG" == "--debug" ]; then
+ CONFIGURATION=Debug
+else
+ echo "Unknown flag: $FLAG"
+ exit 1
+fi
+if [ "$OTHER_FLAGS" != "" ]; then
+ echo "More than one flag provided, specify either --debug or --release only"
+ exit 2
+fi
+$CORDOVA_PATH/clean
+xcodebuild -project $PROJECT_NAME.xcodeproj -arch i386 -target $PROJECT_NAME -configuration $CONFIGURATION -sdk $SDK build VALID_ARCHS="i386" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build"