cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject [03/11] ios commit: [CB-2916] Add a ./cordova/clean project-level script for iOS
Date Thu, 25 Apr 2013 13:42:56 GMT
[CB-2916] Add a ./cordova/clean 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/8e4c49e0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/8e4c49e0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/8e4c49e0

Branch: refs/heads/master
Commit: 8e4c49e0e012d69a3e6a939d862965984d3f0d04
Parents: 41955f9
Author: Shazron Abdullah <shazron@apache.org>
Authored: Tue Apr 23 17:14:51 2013 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Thu Apr 25 06:32:26 2013 -0700

----------------------------------------------------------------------
 bin/templates/project/cordova/clean |   44 ++++++++++++++++++++++++++++++
 1 files changed, 44 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/8e4c49e0/bin/templates/project/cordova/clean
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/clean b/bin/templates/project/cordova/clean
new file mode 100755
index 0000000..9a386fe
--- /dev/null
+++ b/bin/templates/project/cordova/clean
@@ -0,0 +1,44 @@
+#!/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.
+#
+
+#
+# Clean a Cordova/iOS project
+#
+
+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"
+
+xcodebuild -project $PROJECT_NAME.xcodeproj -configuration Debug -alltargets clean
+xcodebuild -project $PROJECT_NAME.xcodeproj -configuration Release -alltargets clean


Mime
View raw message