You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/12/24 04:48:52 UTC

git commit: Revert "CB-5397 Make iOS project file's www/ and config.xml point at the non-platforms versions."

Updated Branches:
  refs/heads/master 8bde8edfa -> cf3c3c28a


Revert "CB-5397 Make iOS project file's www/ and config.xml point at the non-platforms versions."

This reverts commit 8bde8edfa7976bfe116e22451cb375949a76035c.

The change broke the copying of the correct config.xml file.


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

Branch: refs/heads/master
Commit: cf3c3c28acf1e47e11657e08f59a5348f776d7e5
Parents: 8bde8ed
Author: Andrew Grieve <ag...@chromium.org>
Authored: Mon Dec 23 22:48:12 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Mon Dec 23 22:48:12 2013 -0500

----------------------------------------------------------------------
 src/platform.js | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/cf3c3c28/src/platform.js
----------------------------------------------------------------------
diff --git a/src/platform.js b/src/platform.js
index 0ed9b92..682cfb7 100644
--- a/src/platform.js
+++ b/src/platform.js
@@ -244,18 +244,11 @@ function call_into_create(target, projectRoot, cfg, libDir, template_dir) {
 
             // Run platform's create script
             var d = Q.defer();
-            var parser;
             child_process.exec(command, function(err, create_output, stderr) {
                 events.emit('verbose', create_output);
                 if (err) {
                     d.reject(new Error('An error occured during creation of ' + target + ' sub-project. ' + create_output + '\n' + stderr));
                 } else {
-                    parser = new platforms[target].parser(output);
-                    // Fix up www and config.xml project references to point at the top-level ones.
-                    if (target=='ios') {
-                        shell.sed('-i', /(PBXFileReference.*)(path[\s=]*)"?www"?(;)/, '$1name = www; $2"../../www"$3', parser.pbxproj);
-                        shell.sed('-i', /(PBXFileReference.*path[\s=]*)"?[^\/]+\/config.xml"?(;)/, '$1"../../www/config.xml"$2', parser.pbxproj);
-                    }
                     d.resolve(require('../cordova').raw.prepare(target));
                 }
             });
@@ -264,6 +257,7 @@ function call_into_create(target, projectRoot, cfg, libDir, template_dir) {
                 // Install all currently installed plugins into this new platform.
                 var plugins_dir = path.join(projectRoot, 'plugins');
                 var plugins = cordova_util.findPlugins(plugins_dir);
+                var parser = new platforms[target].parser(output);
                 if (!plugins) return Q();
 
                 var plugman = require('plugman');