cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject git commit: CB-5989 Default to $PROJECT_NAME-Info.plist when searching for plist files
Date Tue, 07 Oct 2014 18:11:27 GMT
Repository: cordova-lib
Updated Branches:
  refs/heads/master 35a3059bb -> 6096b9908


CB-5989 Default to $PROJECT_NAME-Info.plist when searching for plist files

If a Info.plist file is given with asterisk and there are multiple matches default to use
the
file for the project.

github: close #95


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

Branch: refs/heads/master
Commit: 6096b9908b853011be947be3afafef36af115311
Parents: 35a3059
Author: Gorkem Ercan <gorkem.ercan@gmail.com>
Authored: Mon Sep 29 20:31:14 2014 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Tue Oct 7 14:11:05 2014 -0400

----------------------------------------------------------------------
 cordova-lib/src/plugman/util/config-changes.js | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/6096b990/cordova-lib/src/plugman/util/config-changes.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/config-changes.js b/cordova-lib/src/plugman/util/config-changes.js
index 8a580cc..0fd5763 100644
--- a/cordova-lib/src/plugman/util/config-changes.js
+++ b/cordova-lib/src/plugman/util/config-changes.js
@@ -676,6 +676,17 @@ function resolveConfigFilePath(project_dir, platform, file) {
         // handle wildcards in targets using glob.
         matches = glob.sync(path.join(project_dir, '**', file));
         if (matches.length) filepath = matches[0];
+        
+        // [CB-5989] multiple Info.plist files may exist. default to $PROJECT_NAME-Info.plist
+        if(matches.length > 1 && file.indexOf("-Info.plist")>-1){
+            var plistName =  getIOSProjectname(project_dir)+'-Info.plist';
+            for (var i=0; i < matches.length; i++) {
+                if(matches[i].indexOf(plistName) > -1){
+                    filepath = matches[i];
+                    break;
+                }
+            }    
+        }
         return filepath;
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message