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 c7126a43279fecc6f66fbb6abd899f35d4747483 Author: Jan Piotrowski <piotrow...@gmail.com> AuthorDate: Wed Feb 14 19:26:23 2018 +0100 now also remove filterSupportedTargets from build.js --- template/cordova/lib/build.js | 48 ------------------------------------------- 1 file changed, 48 deletions(-) diff --git a/template/cordova/lib/build.js b/template/cordova/lib/build.js index 0b09d32..efbf22b 100644 --- a/template/cordova/lib/build.js +++ b/template/cordova/lib/build.js @@ -438,54 +438,6 @@ function clearIntermediatesAndGetPackage (bundleTerms, config, hasAnyCpu) { return pckage.getPackageFileInfo(finalFile); } -// TODO: Fix this so that it outlines supported versions based on version criteria: -// - v14: Windows 8.1, Windows 10 -// - v12: Windows 8.1 -function msBuild12TargetsFilter (target) { - return target === projFiles.win || target === projFiles.phone; -} - -function msBuild14TargetsFilter (target) { - return target === projFiles.win || target === projFiles.phone || target === projFiles.win10; -} - -function msBuild15TargetsFilter (target) { - return target === projFiles.win || target === projFiles.phone || target === projFiles.win10; -} - -function filterSupportedTargets (targets, msbuild) { - if (!targets || targets.length === 0) { - events.emit('warn', 'No build targets specified'); - return []; - } - - var targetFilters = { - '12.0': msBuild12TargetsFilter, - '14.0': msBuild14TargetsFilter, - '15.x': msBuild15TargetsFilter, - get: function (version) { - // Apart from exact match also try to get filter for version range - // so we can find for example targets for version '15.1' - return this[version] || this[version.replace(/\.\d+$/, '.x')]; - } - }; - - var filter = targetFilters.get(msbuild.version); - if (!filter) { - events.emit('warn', 'MSBuild v' + msbuild.version + ' is not supported, aborting.'); - return []; - } - - var supportedTargets = targets.filter(filter); - // unsupported targets have been detected - if (supportedTargets.length !== targets.length) { - events.emit('warn', 'Not all desired build targets are compatible with the current build environment. ' + - 'Please install Visual Studio 2015 for Windows 8.1 and Windows 10, ' + - 'or Visual Studio 2013 Update 2 for Windows 8.1.'); - } - return supportedTargets; -} - function cleanIntermediates () { var buildPath = path.join(ROOT, 'build'); if (shell.test('-e', buildPath)) { -- To stop receiving notification emails like this one, please contact jan...@apache.org. --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org