You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by lo...@apache.org on 2013/06/26 00:31:48 UTC
webworks commit: [CB-3341] add version script to playbook and bbos,
copies VERSION file as part of build action
Updated Branches:
refs/heads/master 8d01823cb -> 8d45e0d7c
[CB-3341] add version script to playbook and bbos, copies VERSION file as part of build action
Project: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/commit/8d45e0d7
Tree: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/tree/8d45e0d7
Diff: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/diff/8d45e0d7
Branch: refs/heads/master
Commit: 8d45e0d7c34a1ace24fa131b273b8b976acf94bd
Parents: 8d01823
Author: lorinbeer <lo...@adobe.com>
Authored: Tue Jun 25 15:31:37 2013 -0700
Committer: lorinbeer <lo...@adobe.com>
Committed: Tue Jun 25 15:31:37 2013 -0700
----------------------------------------------------------------------
bbos/bin/templates/project/cordova/version | 38 +++++++++++++++++++++
bbos/build.xml | 7 +++-
playbook/bin/templates/project/cordova/version | 38 +++++++++++++++++++++
playbook/build.xml | 7 ++++
4 files changed, 89 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/8d45e0d7/bbos/bin/templates/project/cordova/version
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/cordova/version b/bbos/bin/templates/project/cordova/version
new file mode 100644
index 0000000..74c4ef0
--- /dev/null
+++ b/bbos/bin/templates/project/cordova/version
@@ -0,0 +1,38 @@
+#!/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.
+#
+
+
+CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
+PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
+
+VERSION_FILE_PATH="$PROJECT_PATH/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
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/8d45e0d7/bbos/build.xml
----------------------------------------------------------------------
diff --git a/bbos/build.xml b/bbos/build.xml
index 8967ca6..714ac02 100644
--- a/bbos/build.xml
+++ b/bbos/build.xml
@@ -42,7 +42,7 @@
<property name="jar.basename" value="cordova.${version}.jar" />
<property name="jar.file" value="${jar.path}/${jar.basename}" />
- <property name="playbook.js.path" value="javascript/playbook" />
+ <property name="version.file" value="VERSION" />
<property name="js.src" location="javascript" />
<property name="js.path" value="javascript" />
@@ -81,6 +81,11 @@
<fileset dir="${template.project.dir}" />
</copy>
+ <!-- copy version file -->
+ <copy todir="${project.path}">
+ <fileset file="${version.file}" />
+ </copy>
+
<!-- change file permission for cordova scripts because ant copy doesn't preserve file permissions -->
<chmod dir="${project.path}/cordova" perm="700" includes="*"/>
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/8d45e0d7/playbook/bin/templates/project/cordova/version
----------------------------------------------------------------------
diff --git a/playbook/bin/templates/project/cordova/version b/playbook/bin/templates/project/cordova/version
new file mode 100644
index 0000000..74c4ef0
--- /dev/null
+++ b/playbook/bin/templates/project/cordova/version
@@ -0,0 +1,38 @@
+#!/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.
+#
+
+
+CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
+PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
+
+VERSION_FILE_PATH="$PROJECT_PATH/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
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/8d45e0d7/playbook/build.xml
----------------------------------------------------------------------
diff --git a/playbook/build.xml b/playbook/build.xml
index 25366d4..f1d1b04 100644
--- a/playbook/build.xml
+++ b/playbook/build.xml
@@ -46,6 +46,8 @@
<property name="playbook.ext.src" location="framework/ext-air" />
<property name="playbook.ext.path" value="ext-air" />
+ <property name="version.file" value="VERSION" />
+
<property name="js.src" location="javascript" />
<property name="js.path" value="javascript" />
<property name="js.basename" value="cordova.js" />
@@ -96,6 +98,11 @@
<fileset dir="${template.project.dir}" />
</copy>
+ <!-- copy version file to project -->
+ <copy todir="${project.path}">
+ <fileset file="${version.file}" />
+ </copy>
+
<!-- change file permission for cordova scripts because ant copy doesn't preserve file permissions -->
<chmod dir="${project.path}/cordova" perm="700" includes="*"/>