You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/11/20 01:41:08 UTC

[GitHub] [cordova-ios] renanccastro commented on a change in pull request #719: Add check for newer versions of cocoapods to avoid locking adding platforms on non synced pods repo

renanccastro commented on a change in pull request #719: Add check for newer versions of cocoapods to avoid locking adding platforms on non synced pods repo
URL: https://github.com/apache/cordova-ios/pull/719#discussion_r348255462
 
 

 ##########
 File path: bin/templates/scripts/cordova/lib/check_reqs.js
 ##########
 @@ -121,6 +121,20 @@ module.exports.check_cocoapods = function (toolChecker) {
         // check whether the cocoapods repo has been synced through `pod repo` command
         // a value of '0 repos' means it hasn't been synced
         .then(function (toolOptions) {
+            let podVersion = shell.exec('pod --version', { silent: true });
+            if (podVersion) {
+                const semver = podVersion.toString().split('.');
+                if (semver.length >= 3) {
+                    const major = parseInt(semver[0]);
+                    const minor = parseInt(semver[1]);
+                    const patch = parseInt(semver[2]);
+
+                    // starting with 1.8.0 cocoapods now use cdn and we dont need to sync first
+                    if ((major >= 1 && minor >= 8 && patch >= 0) || toolOptions.ignore) {
+                        return Q.resolve(toolOptions);
+                    }
 
 Review comment:
   Thanks, guys. I missed that this dependency was already on the tree. I've already changed the code and squashed the commit. I changed the other flow inside this method to return native promise also, to standardize this at least inside this method. Thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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