cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject ios commit: [CB-3339] add version to command line scripts
Date Mon, 13 May 2013 22:05:56 GMT
Updated Branches:
  refs/heads/master 09343c776 -> 236e12e95


[CB-3339] add version to command line 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/236e12e9
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/236e12e9
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/236e12e9

Branch: refs/heads/master
Commit: 236e12e95104ea944a4aa722751098a19f0caaba
Parents: 09343c7
Author: Shazron Abdullah <shazron@apache.org>
Authored: Mon May 13 15:05:56 2013 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Mon May 13 15:05:56 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/236e12e9/bin/templates/project/cordova/version
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/version b/bin/templates/project/cordova/version
new file mode 100755
index 0000000..f466559
--- /dev/null
+++ b/bin/templates/project/cordova/version
@@ -0,0 +1,40 @@
+#!/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.
+#
+
+#
+# Returns the VERSION of CordovaLib used. 
+# Note: it does not work if the --shared option was used to create the project.
+#
+
+set -e
+
+CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
+PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
+
+VERSION_FILE_PATH="$PROJECT_PATH/CordovaLib/VERSION"
+VERSION=$(<$VERSION_FILE_PATH)
+
+if [ -f "$VERSION_FILE_PATH" ]; then
+  echo $VERSION 
+else
+  echo "The file \"$VERSION_FILE_PATH\" does not exist."
+  exit 1
+fi
\ No newline at end of file


Mime
View raw message