cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [1/2] git commit: CB-5067: added exception incase no platform level config.xml or defaults.xml exisit
Date Sat, 12 Oct 2013 01:03:44 GMT
Updated Branches:
  refs/heads/master 1a2b987e4 -> f00b19cca


CB-5067: added exception incase no platform level config.xml or defaults.xml exisit

Also updated cli to use 3.1.0 instead of 3.1.0-rc1


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

Branch: refs/heads/master
Commit: 5b9961f219c169fdfd18748b0bcae68e9f96b02f
Parents: e6e7b63
Author: Steven Gill <stevengill97@gmail.com>
Authored: Fri Oct 11 18:02:34 2013 -0700
Committer: Steven Gill <stevengill97@gmail.com>
Committed: Fri Oct 11 18:02:34 2013 -0700

----------------------------------------------------------------------
 platforms.js                     | 14 +++++++-------
 src/metadata/firefoxos_parser.js |  4 +---
 src/prepare.js                   |  8 ++++++--
 3 files changed, 14 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/5b9961f2/platforms.js
----------------------------------------------------------------------
diff --git a/platforms.js b/platforms.js
index 82ba8c8..724b3b8 100644
--- a/platforms.js
+++ b/platforms.js
@@ -21,36 +21,36 @@ module.exports = {
     'ios' : {
         parser : './src/metadata/ios_parser',
         url    : 'https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git',
-        version: '3.1.0-rc1'
+        version: '3.1.0'
     }, 
     'android' : {
         parser : './src/metadata/android_parser',
         url    : 'https://git-wip-us.apache.org/repos/asf?p=cordova-android.git',
-        version: '3.1.0-rc1'
+        version: '3.1.0'
     }, 
     'wp7' : {
         parser : './src/metadata/wp7_parser',
         url    : 'https://git-wip-us.apache.org/repos/asf?p=cordova-wp8.git',
-        version: '3.1.0-rc1'
+        version: '3.1.0'
     },
     'wp8' : {
         parser : './src/metadata/wp8_parser',
         url    : 'https://git-wip-us.apache.org/repos/asf?p=cordova-wp8.git',
-        version: '3.1.0-rc1'
+        version: '3.1.0'
     },
     'blackberry10' : {
         parser : './src/metadata/blackberry10_parser',
         url    : 'https://git-wip-us.apache.org/repos/asf?p=cordova-blackberry.git',
-        version: '3.1.0-rc1'
+        version: '3.1.0'
     },
     'www':{
         url    : 'https://git-wip-us.apache.org/repos/asf?p=cordova-app-hello-world.git',
-        version: '3.1.0-rc1'
+        version: '3.1.0'
     },
     'firefoxos':{
         parser: './src/metadata/firefoxos_parser',
         url    : 'https://git-wip-us.apache.org/repos/asf?p=cordova-firefoxos.git',
-        version: '3.1.0-rc1'
+        version: '3.1.0'
     }
 };
 

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/5b9961f2/src/metadata/firefoxos_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/firefoxos_parser.js b/src/metadata/firefoxos_parser.js
index 51f6e1a..df6cd1e 100644
--- a/src/metadata/firefoxos_parser.js
+++ b/src/metadata/firefoxos_parser.js
@@ -86,7 +86,6 @@ module.exports.prototype = {
         shell.cp('-f',
                  path.join(libPath, 'cordova-lib', 'cordova.js'),
                  path.join(platformWww, 'cordova.js'));
-        this.config_path = path.join(projectWww, 'config.xml');
     },
 
     update_overrides: function() {
@@ -110,9 +109,8 @@ module.exports.prototype = {
                      this.www_dir());
         }
     },
-    
     config_xml:function(){
-        return path.join(util.projectWww(util.isCordova(this.path)), 'config.xml')
+        return path.join(this.path, 'www', 'config.xml');
     },
 
     // Returns a promise.

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/5b9961f2/src/prepare.js
----------------------------------------------------------------------
diff --git a/src/prepare.js b/src/prepare.js
index 62dbf65..6a4650b 100644
--- a/src/prepare.js
+++ b/src/prepare.js
@@ -70,14 +70,18 @@ module.exports = function prepare(options) {
             .then(function() {
                 var parser = new platforms[platform].parser(platformPath),
                     defaults_xml_path = path.join(platformPath, "cordova", "defaults.xml");
-
                 //If defaults.xml is present, overwrite platform config.xml with it
                 //Otherwise save whatever is there as defaults so it can be restored
+                //or copy project config into platform if none exists
                 if (fs.existsSync(defaults_xml_path)) {
                     shell.cp("-f", defaults_xml_path, parser.config_xml());
                     events.emit('log', 'Generating config.xml from defaults for platform
"' + platform + '"');
                 } else {
-                    shell.cp("-f", parser.config_xml(), defaults_xml_path);
+                    if(fs.existsSync(parser.config_xml())){
+                        shell.cp("-f", parser.config_xml(), defaults_xml_path);
+                    }else{
+                        shell.cp("-f",xml,parser.config_xml());
+                    }   
                 }
 
                 // Call plugman --prepare for this platform. sets up js-modules appropriately.


Mime
View raw message