npm v 2.8.1. adding missing build script and updating scripts from 2.8.0rc1.
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/bd09328f Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/bd09328f Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/bd09328f Branch: refs/heads/2.8.x Commit: bd09328ff79d97bc7512e384970e52e65f8fb92a Parents: 9516dfa Author: Fil Maj <[email protected]> Authored: Mon Jun 3 17:09:33 2013 -0700 Committer: Fil Maj <[email protected]> Committed: Tue Jun 4 10:34:20 2013 -0700 ---------------------------------------------------------------------- .../bin/templates/project/cordova/build | 60 +++++++++++++++ .../bin/templates/project/cordova/emulate | 2 - .../templates/project/cordova/lib/install-emulator | 4 +- .../templates/project/cordova/lib/sim.applescript | 17 ++++ lib/cordova-ios/bin/templates/project/cordova/run | 2 - package.json | 2 +- 6 files changed, 79 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/bd09328f/lib/cordova-ios/bin/templates/project/cordova/build ---------------------------------------------------------------------- diff --git a/lib/cordova-ios/bin/templates/project/cordova/build b/lib/cordova-ios/bin/templates/project/cordova/build new file mode 100755 index 0000000..78fe2c1 --- /dev/null +++ b/lib/cordova-ios/bin/templates/project/cordova/build @@ -0,0 +1,60 @@ +#!/bin/bash + +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# +# compile and launch a Cordova/iOS project to the simulator +# + +set -e + +XCODE_VER=$(xcodebuild -version | head -n 1 | sed -e 's/Xcode //') +XCODE_MIN_VERSION="4.5" + +if [[ "$XCODE_VER" < "$XCODE_MIN_VERSION" ]]; then + echo "Cordova can only run in Xcode version $XCODE_MIN_VERSION or greater." + exit 1 +fi + +CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P) +PROJECT_PATH="$(dirname "$CORDOVA_PATH")" +XCODEPROJ=$( ls "$PROJECT_PATH" | grep .xcodeproj ) +PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj) + +cd "$PROJECT_PATH" + +APP=build/$PROJECT_NAME.app +SDK=`xcodebuild -showsdks | grep Sim | tail -1 | awk '{print $6}'` + +FLAG=${1:---debug} +OTHER_FLAGS=$2 +CONFIGURATION=Debug + +if [ "$FLAG" == "--release" ]; then + CONFIGURATION=Release +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" http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/bd09328f/lib/cordova-ios/bin/templates/project/cordova/emulate ---------------------------------------------------------------------- diff --git a/lib/cordova-ios/bin/templates/project/cordova/emulate b/lib/cordova-ios/bin/templates/project/cordova/emulate index e81c1bd..9a3c3c4 100755 --- a/lib/cordova-ios/bin/templates/project/cordova/emulate +++ b/lib/cordova-ios/bin/templates/project/cordova/emulate @@ -18,8 +18,6 @@ # under the License. # -set -e - XCODE_VER=$(xcodebuild -version | head -n 1 | sed -e 's/Xcode //') XCODE_MIN_VERSION="4.5" http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/bd09328f/lib/cordova-ios/bin/templates/project/cordova/lib/install-emulator ---------------------------------------------------------------------- diff --git a/lib/cordova-ios/bin/templates/project/cordova/lib/install-emulator b/lib/cordova-ios/bin/templates/project/cordova/lib/install-emulator index a5485cf..4fd0fbb 100755 --- a/lib/cordova-ios/bin/templates/project/cordova/lib/install-emulator +++ b/lib/cordova-ios/bin/templates/project/cordova/lib/install-emulator @@ -24,8 +24,6 @@ # "iPad" # "iPad (Retina)" -set -e - OPTION_RESULT=() TARGET="iPhone (Retina 3.5-inch)" TARGET_FLAG='--family iphone --retina' @@ -111,7 +109,7 @@ if [ ! -d "$APP_PATH" ]; then fi IOS_SIM_MIN_VERSION="1.5" -IOS_SIM_LOCATION=$(which xcodebuild) +IOS_SIM_LOCATION=$(which ios-sim) if [ $? != 0 ]; then echo -e "\033[31mError: ios-sim was not found. Please download, build and install version $IOS_SIM_MIN_VERSION or greater from https://github.com/phonegap/ios-sim into your path. Or 'brew install ios-sim' using homebrew: http://mxcl.github.com/homebrew/\033[m"; exit 1; exit 1 http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/bd09328f/lib/cordova-ios/bin/templates/project/cordova/lib/sim.applescript ---------------------------------------------------------------------- diff --git a/lib/cordova-ios/bin/templates/project/cordova/lib/sim.applescript b/lib/cordova-ios/bin/templates/project/cordova/lib/sim.applescript index 5f6b152..8425625 100755 --- a/lib/cordova-ios/bin/templates/project/cordova/lib/sim.applescript +++ b/lib/cordova-ios/bin/templates/project/cordova/lib/sim.applescript @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + tell application "System Events" set UI elements enabled to true end tell http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/bd09328f/lib/cordova-ios/bin/templates/project/cordova/run ---------------------------------------------------------------------- diff --git a/lib/cordova-ios/bin/templates/project/cordova/run b/lib/cordova-ios/bin/templates/project/cordova/run index da0916c..a616352 100755 --- a/lib/cordova-ios/bin/templates/project/cordova/run +++ b/lib/cordova-ios/bin/templates/project/cordova/run @@ -24,8 +24,6 @@ # "iPad" # "iPad (Retina)" -set -e - OPTION_RESULT=() TARGET="iPhone (Retina 3.5-inch)" TARGET_FLAG='--family iphone --retina' http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/bd09328f/package.json ---------------------------------------------------------------------- diff --git a/package.json b/package.json index e2ea2ff..74c73f4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova", - "version": "2.8.0", + "version": "2.8.1", "preferGlobal": "true", "description": "Cordova command line interface tool", "main": "cordova",
