cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lorinb...@apache.org
Subject ios commit: [CB-8044] support for --nobuild flag
Date Fri, 12 Dec 2014 19:40:25 GMT
Repository: cordova-ios
Updated Branches:
  refs/heads/CB8044 [created] 9ea4c782c


[CB-8044] support for --nobuild flag


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/9ea4c782
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/9ea4c782
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/9ea4c782

Branch: refs/heads/CB8044
Commit: 9ea4c782c64beec4a9c569f9ca61575bd25a733e
Parents: ea2a946
Author: Lorin Beer <lorin.beer@gmail.com>
Authored: Fri Dec 12 11:38:54 2014 -0800
Committer: Lorin Beer <lorin.beer@gmail.com>
Committed: Fri Dec 12 11:38:54 2014 -0800

----------------------------------------------------------------------
 bin/templates/scripts/cordova/run | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/9ea4c782/bin/templates/scripts/cordova/run
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/run b/bin/templates/scripts/cordova/run
index ff60876..12334ac 100755
--- a/bin/templates/scripts/cordova/run
+++ b/bin/templates/scripts/cordova/run
@@ -37,6 +37,9 @@ TARGET="iPhone-6"
 USE_DEVICE=true
 USE_SIMULATOR=false
 
+# options
+NO_BUILD=false
+
 # separates "key=value", sets an array with 0th index as key, 1st index as value
 _parseOption()
 {
@@ -71,6 +74,9 @@ _parseArgs()
       USE_DEVICE=false
       USE_SIMULATOR=true
       ;;
+    "--nobuild")
+      NO_BUILD=true
+      ;;
     esac
   done
 }
@@ -109,7 +115,9 @@ if "$USE_DEVICE"; then
         USE_SIMULATOR=true
     else
         # if we got here, we can deploy the app, then exit success
-        "$CORDOVA_PATH/build" --device || exit $?
+        if [ ! $NO_BUILD ] then
+            "$CORDOVA_PATH/build" --device || exit $?
+        fi
         ios-deploy -d -b "$DEVICE_APP_PATH"
     	exit 0
     fi
@@ -131,7 +139,9 @@ if "$USE_SIMULATOR"; then
     fi
     
     # launch using ios-sim
-    "$CORDOVA_PATH/build" --emulator || exit $?
+    if [ ! $NO_BUILD ] then
+        "$CORDOVA_PATH/build" --emulator || exit $?
+    fi
     ios-sim launch "$SIMULATOR_APP_PATH" --stderr "$CORDOVA_PATH/console.log" --stdout "$CORDOVA_PATH/console.log"
--devicetypeid com.apple.CoreSimulator.SimDeviceType.$TARGET --exit
 fi
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message