You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ja...@apache.org on 2018/02/15 14:46:08 UTC

[cordova-windows] 16/26: move method

This is an automated email from the ASF dual-hosted git repository.

janpio pushed a commit to branch janpio-msbuild_cleanup
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git

commit f54e3607b42526dc8d2c8adda177b5572523933f
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Thu Feb 15 00:47:40 2018 +0100

    move method
---
 template/cordova/lib/MSBuildTools.js | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/template/cordova/lib/MSBuildTools.js b/template/cordova/lib/MSBuildTools.js
index 8fc16c3..53e2c20 100644
--- a/template/cordova/lib/MSBuildTools.js
+++ b/template/cordova/lib/MSBuildTools.js
@@ -72,20 +72,6 @@ MSBuildTools.prototype.buildProject = function (projFile, buildType, buildarch,
     });
 };
 
-// returns full path to msbuild tools required to build the project and tools version
-// check_reqs.js -> run()
-module.exports.findAvailableVersion = function () {
-    var versions = ['15.5', '15.0', '14.0', '12.0', '4.0'];
-
-    return Q.all(versions.map(checkMSBuildVersion)).then(function (versions) {
-        console.log('findAvailableVersion', versions);
-        // select first msbuild version available, and resolve promise with it
-        var msbuildTools = versions[0] || versions[1] || versions[2] || versions[3] || versions[4];
-
-        return msbuildTools ? Q.resolve(msbuildTools) : Q.reject('MSBuild tools not found');
-    });
-};
-
 // build.js -> run()
 // check_reqs.js -> checkMSBuild()
 module.exports.findAllAvailableVersions = function () {
@@ -118,6 +104,20 @@ function findAllAvailableVersionsFallBack () {
     });
 }
 
+// returns full path to msbuild tools required to build the project and tools version
+// check_reqs.js -> run()
+module.exports.findAvailableVersion = function () {
+    var versions = ['15.5', '15.0', '14.0', '12.0', '4.0'];
+
+    return Q.all(versions.map(checkMSBuildVersion)).then(function (versions) {
+        console.log('findAvailableVersion', versions);
+        // select first msbuild version available, and resolve promise with it
+        var msbuildTools = versions[0] || versions[1] || versions[2] || versions[3] || versions[4];
+
+        return msbuildTools ? Q.resolve(msbuildTools) : Q.reject('MSBuild tools not found');
+    });
+};
+
 /**
  * Gets MSBuildTools instance for user-specified location
  *

-- 
To stop receiving notification emails like this one, please contact
janpio@apache.org.

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