cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject [2/10] git commit: shifted the update_overrides method out of build and into the parsers
Date Tue, 05 Mar 2013 00:20:33 GMT
shifted the update_overrides method out of build and into the parsers

- per Filip's feedback shfted the update_overrides() into
update_project and out of build.js
- added util.deleteSvnFolders to update_overrides()


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

Branch: refs/heads/master
Commit: 293ec627ce7b009953d54003093325dd4896cce6
Parents: b7bd89a
Author: michael.wolf <michael.wolf@MWolf-MBP.local>
Authored: Tue Feb 12 22:24:25 2013 -0500
Committer: Fil Maj <maj.fil@gmail.com>
Committed: Mon Mar 4 10:46:46 2013 -0800

----------------------------------------------------------------------
 src/metadata/android_parser.js    |    2 +-
 src/metadata/blackberry_parser.js |    7 +++++--
 src/metadata/ios_parser.js        |    4 ++++
 src/platform.js                   |    9 ++++++---
 4 files changed, 16 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/293ec627/src/metadata/android_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/android_parser.js b/src/metadata/android_parser.js
index e83bb82..c36491a 100644
--- a/src/metadata/android_parser.js
+++ b/src/metadata/android_parser.js
@@ -1,4 +1,3 @@
-
 /**
     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
@@ -155,6 +154,7 @@ module.exports.prototype = {
     update_project:function(cfg, callback) {
         this.update_from_config(cfg);
         this.update_www();
+        this.update_overrides();
         if (callback) callback();
     }
 };

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/293ec627/src/metadata/blackberry_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/blackberry_parser.js b/src/metadata/blackberry_parser.js
index 91d0f60..cacc260 100644
--- a/src/metadata/blackberry_parser.js
+++ b/src/metadata/blackberry_parser.js
@@ -59,10 +59,12 @@ module.exports.prototype = {
         this.xml.update();
     },
     update_project:function(cfg, callback) {
-        this.update_from_config(cfg);
-        this.update_www();
         var self = this;
 
+        self.update_from_config(cfg);
+        self.update_www();
+        self.update_overrides();
+
         // Do we have BB config?
         var projectRoot = util.isCordova(this.path);
         var dotFile = path.join(projectRoot, '.cordova', 'config.json');
@@ -127,6 +129,7 @@ module.exports.prototype = {
         var platformWww = path.join(this.path, 'www');
         var overrides = path.join(projectRoot, 'merges','blackberry');
         shell.cp('-rf', overrides+'/*',platformWww);
+        util.deleteSvnFolders(platformWww);
     },
 
     write_project_properties:function() {

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/293ec627/src/metadata/ios_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/ios_parser.js b/src/metadata/ios_parser.js
index 03455ed..9cf4450 100644
--- a/src/metadata/ios_parser.js
+++ b/src/metadata/ios_parser.js
@@ -160,12 +160,16 @@ module.exports.prototype = {
         var project_www = path.join(this.path, 'www');
         var overrides = path.join(projectRoot, 'merges','ios');
         shell.cp('-rf', overrides+'/*',project_www);
+
+        util.deleteSvnFolders(project_www);
+
     },
 
     update_project:function(cfg, callback) {
         var self = this;
         this.update_from_config(cfg, function() {
             self.update_www();
+            self.update_overrides();
             if (callback) callback();
         });
     }

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/293ec627/src/platform.js
----------------------------------------------------------------------
diff --git a/src/platform.js b/src/platform.js
index 4705130..604561d 100644
--- a/src/platform.js
+++ b/src/platform.js
@@ -94,23 +94,26 @@ module.exports = function platform(command, targets, callback) {
                             switch(target) {
                                 case 'android':
                                     var android = new android_parser(output);
-                                    android.update_project(cfg);
                                     createOverrides(target);
+
+                                    android.update_project(cfg);
                                     hooks.fire('after_platform_add');
                                     end();
                                     break;
                                 case 'ios':
                                     var ios = new ios_parser(output);
+                                    createOverrides(target);
+
                                     ios.update_project(cfg, function() {
-                                        createOverrides(target);
                                         hooks.fire('after_platform_add');
                                         end();
                                     });
                                     break;
                                 case 'blackberry':
                                     var bb = new blackberry_parser(output);
+                                    createOverrides(target);
+
                                     bb.update_project(cfg, function() {
-                                        createOverrides(target);
                                         hooks.fire('after_platform_add');
                                         end();
                                     });


Mime
View raw message