Repository: cordova-app-harness
Updated Branches:
  refs/heads/master 18f4ce7af -> 6eabf1b49


Make createproject.sh be able to set the app's version


Project: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/cordova-app-harness/commit/6eabf1b4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/tree/6eabf1b4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/diff/6eabf1b4

Branch: refs/heads/master
Commit: 6eabf1b4975491e57d729ce87269adb1e4a3a9b3
Parents: 18f4ce7
Author: Andrew Grieve <[email protected]>
Authored: Fri May 2 15:30:34 2014 -0400
Committer: Andrew Grieve <[email protected]>
Committed: Fri May 2 15:30:34 2014 -0400

----------------------------------------------------------------------
 config.xml       | 2 +-
 createproject.sh | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/6eabf1b4/config.xml
----------------------------------------------------------------------
diff --git a/config.xml b/config.xml
index 229aeda..4292daf 100644
--- a/config.xml
+++ b/config.xml
@@ -17,7 +17,7 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<widget id="{ID}" version="0.0.1" xmlns="http://www.w3.org/ns/widgets"; 
xmlns:cdv="http://cordova.apache.org/ns/1.0";>
+<widget id="{ID}" version="{VERSION}" xmlns="http://www.w3.org/ns/widgets"; 
xmlns:cdv="http://cordova.apache.org/ns/1.0";>
     <name>{NAME}</name>
     <content src="cdvah/index.html" />
     <access origin="*" />

http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/6eabf1b4/createproject.sh
----------------------------------------------------------------------
diff --git a/createproject.sh b/createproject.sh
index 2b2191c..18e05f2 100755
--- a/createproject.sh
+++ b/createproject.sh
@@ -8,6 +8,7 @@ if [[ $# -eq 0 || "$1" = "--help" ]]; then
     echo '  PLUGIN_SEARCH_PATH="path1:path2:path3"'
     echo '  APP_ID="org.apache.AppHarness"'
     echo '  APP_NAME="CordovaAppHarness"'
+    echo '  APP_VERSION="0.0.1"'
     exit 1
 fi
 
@@ -15,6 +16,7 @@ CORDOVA="${CORDOVA-cordova}"
 PLATFORMS="${PLATFORMS-android}"
 APP_ID=${APP_ID-org.apache.appharness}
 APP_NAME=${APP_NAME-CordovaAppHarness}
+APP_VERSION=${APP_VERSION-0.0.1}
 DIR_NAME="${1}"
 AH_PATH="$(cd $(dirname $0) && pwd)"
 PLUGIN_SEARCH_PATH="${PLUGIN_SEARCH_PATH}:$(dirname "$AH_PATH"):$(dirname 
"$AH_PATH")/cordova-plugins"
@@ -24,6 +26,7 @@ cd "$DIR_NAME"
 cp "$AH_PATH/config.xml" . || exit 1
 perl -i -pe "s/{ID}/$APP_ID/g" config.xml || exit 1
 perl -i -pe "s/{NAME}/$APP_NAME/g" config.xml || exit 1
+perl -i -pe "s/{VERSION}/$APP_VERSION/g" config.xml || exit 1
 
 
 set -x

Reply via email to