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/18 11:43:32 UTC

[GitHub] [cordova-ios] DAnn2012 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

DAnn2012 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_r347335326
 
 

 ##########
 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) {
 
 Review comment:
   Hi,
   
   maybe it's better this way:
   
   `if (((major > 1) || (major == 1 && minor >= 8 && patch >= 0)) || toolOptions.ignore) {`
   
   do not you think?

----------------------------------------------------------------
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