cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject ios commit: [CB-4827] iOS project/cordova/check_reqs script should be used by all the scripts
Date Mon, 16 Sep 2013 19:16:21 GMT
Updated Branches:
  refs/heads/master 133cac833 -> 5ee272ef6


[CB-4827] iOS project/cordova/check_reqs script should be used by all the scripts


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

Branch: refs/heads/master
Commit: 5ee272ef63f2515b52c3740f5d547135d677d7c8
Parents: 133cac8
Author: Shazron Abdullah <shazron@apache.org>
Authored: Mon Sep 16 12:16:24 2013 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Mon Sep 16 12:16:24 2013 -0700

----------------------------------------------------------------------
 bin/templates/scripts/cordova/build                | 10 ++--------
 bin/templates/scripts/cordova/clean                | 10 ++--------
 bin/templates/scripts/cordova/emulate              | 10 ++--------
 bin/templates/scripts/cordova/lib/install-device   | 10 ++--------
 bin/templates/scripts/cordova/lib/install-emulator | 10 ++--------
 bin/templates/scripts/cordova/run                  | 10 ++--------
 6 files changed, 12 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5ee272ef/bin/templates/scripts/cordova/build
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/build b/bin/templates/scripts/cordova/build
index b16e950..9df4c12 100755
--- a/bin/templates/scripts/cordova/build
+++ b/bin/templates/scripts/cordova/build
@@ -23,19 +23,13 @@
 # compile and launch a Cordova/iOS project to the simulator
 #
 
-XCODE_VER=$(xcodebuild -version | head -n 1 | sed -e 's/Xcode //')
-XCODE_MIN_VERSION="4.6"
-
-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)
 
+source "$CORDOVA_PATH/check_reqs"
+
 cd "$PROJECT_PATH"
 
 APP=build/$PROJECT_NAME.app

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5ee272ef/bin/templates/scripts/cordova/clean
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/clean b/bin/templates/scripts/cordova/clean
index af8143c..b7c2e27 100755
--- a/bin/templates/scripts/cordova/clean
+++ b/bin/templates/scripts/cordova/clean
@@ -25,19 +25,13 @@
 
 set -e
 
-XCODE_VER=$(xcodebuild -version | head -n 1 | sed -e 's/Xcode //')
-XCODE_MIN_VERSION="4.6"
-
-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)
 
+source "$CORDOVA_PATH/check_reqs"
+
 cd "$PROJECT_PATH"
 
 xcodebuild -project "$PROJECT_NAME.xcodeproj" -configuration Debug -alltargets clean

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5ee272ef/bin/templates/scripts/cordova/emulate
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/emulate b/bin/templates/scripts/cordova/emulate
index 0f79b4b..70aa6a4 100755
--- a/bin/templates/scripts/cordova/emulate
+++ b/bin/templates/scripts/cordova/emulate
@@ -18,14 +18,6 @@
 # under the License.
 #
 
-XCODE_VER=$(xcodebuild -version | head -n 1 | sed -e 's/Xcode //')
-XCODE_MIN_VERSION="4.6"
-
-if [[ "$XCODE_VER" < "$XCODE_MIN_VERSION" ]]; then
-	echo "Cordova can only run in Xcode version $XCODE_MIN_VERSION or greater."
-	exit 1
-fi
-
 SDK=`xcodebuild -showsdks | grep Sim | tail -1 | awk '{print $6}'`
 
 CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
@@ -33,6 +25,8 @@ PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
 XCODEPROJ=$( ls "$PROJECT_PATH" | grep .xcodeproj  )
 PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
 
+source "$CORDOVA_PATH/check_reqs"
+
 APP_PATH=${1:-$PROJECT_PATH/build/emulator/$(xcodebuild -project "$PROJECT_PATH/$PROJECT_NAME.xcodeproj"
-arch i386 -target "$PROJECT_NAME" -configuration Debug -sdk $SDK -showBuildSettings | grep
FULL_PRODUCT_NAME | awk -F ' = ' '{print $2}')}
 
 DEVICE_FAMILY=${2:-${DEVICE_FAMILY:-iphone}}

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5ee272ef/bin/templates/scripts/cordova/lib/install-device
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/lib/install-device b/bin/templates/scripts/cordova/lib/install-device
index e16c283..068f207 100755
--- a/bin/templates/scripts/cordova/lib/install-device
+++ b/bin/templates/scripts/cordova/lib/install-device
@@ -24,14 +24,6 @@
 #     "iPad"
 #     "iPad (Retina)"
 
-XCODE_VER=$(xcodebuild -version | head -n 1 | sed -e 's/Xcode //')
-XCODE_MIN_VERSION="4.6"
-
-if [[ "$XCODE_VER" < "$XCODE_MIN_VERSION" ]]; then
-	echo "Cordova can only run in Xcode version $XCODE_MIN_VERSION or greater."
-	exit 1
-fi
-
 LIB_PATH=$( cd "$( dirname "$0" )" && pwd -P)
 CORDOVA_PATH="$(dirname "$LIB_PATH")"
 PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
@@ -40,6 +32,8 @@ PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
 
 DEVICE_APP_PATH="$PROJECT_PATH/build/device/$PROJECT_NAME.app"
 
+source "$CORDOVA_PATH/check_reqs"
+
 if [ ! -d "$DEVICE_APP_PATH" ]; then
 	echo "Project '$DEVIC_APP_PATH' is not built."
     exit 1

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5ee272ef/bin/templates/scripts/cordova/lib/install-emulator
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/lib/install-emulator b/bin/templates/scripts/cordova/lib/install-emulator
index 43e1713..70b5d2e 100755
--- a/bin/templates/scripts/cordova/lib/install-emulator
+++ b/bin/templates/scripts/cordova/lib/install-emulator
@@ -82,14 +82,6 @@ case "$TARGET_LC" in
     ;;
 esac
 
-XCODE_VER=$(xcodebuild -version | head -n 1 | sed -e 's/Xcode //')
-XCODE_MIN_VERSION="4.6"
-
-if [[ "$XCODE_VER" < "$XCODE_MIN_VERSION" ]]; then
-	echo "Cordova can only run in Xcode version $XCODE_MIN_VERSION or greater."
-	exit 1
-fi
-
 LIB_PATH=$( cd "$( dirname "$0" )" && pwd -P)
 CORDOVA_PATH="$(dirname "$LIB_PATH")"
 PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
@@ -98,6 +90,8 @@ PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
 
 SIMULATOR_APP_PATH="$PROJECT_PATH/build/emulator/$PROJECT_NAME.app"
 
+source "$CORDOVA_PATH/check_reqs"
+
 if [ ! -d "$SIMULATOR_APP_PATH" ]; then
 	echo "Project '$SIMULATOR_APP_PATH' is not built."
     exit 1

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5ee272ef/bin/templates/scripts/cordova/run
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/run b/bin/templates/scripts/cordova/run
index a96666e..5a6dfe3 100755
--- a/bin/templates/scripts/cordova/run
+++ b/bin/templates/scripts/cordova/run
@@ -92,14 +92,6 @@ case "$TARGET_LC" in
     ;;
 esac
 
-XCODE_VER=$(xcodebuild -version | head -n 1 | sed -e 's/Xcode //')
-XCODE_MIN_VERSION="4.6"
-
-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  )
@@ -108,6 +100,8 @@ PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
 SIMULATOR_APP_PATH="$PROJECT_PATH/build/emulator/$PROJECT_NAME.app"
 DEVICE_APP_PATH="$PROJECT_PATH/build/device/$PROJECT_NAME.app"
 
+source "$CORDOVA_PATH/check_reqs"
+
 "$CORDOVA_PATH/build" || exit $?
 
 # if device build found, run it first


Mime
View raw message