Github user nikhilkh commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/75#discussion_r30174837 --- Diff: template/cordova/lib/build.js --- @@ -32,88 +33,175 @@ var projFiles = { win: 'CordovaApp.Windows.jsproj', win80: 'CordovaApp.Windows80.jsproj' }; -// parsed nopt arguments -var args; -// build type (Release vs Debug) -var buildType; -// target chip architectures to build for -var buildArchs; -// MSBuild Tools available on this development machine -var msbuild; // builds cordova-windows application with parameters provided. // See 'help' function for args list module.exports.run = function run (argv) { + // MSBuild Tools available on this development machine + var msbuild; + if (!utils.isCordovaProject(ROOT)){ return Q.reject('Could not find project at ' + ROOT); } - try { - // thows exception if something goes wrong - parseAndValidateArgs(argv); - } catch (error) { - return Q.reject(error); - } + return Q.all([parseAndValidateArgs(argv), MSBuildTools.findAvailableVersion()]) + .spread(function(buildConfig, msbuildTools) { + // update platform as per configuration settings + prepare.applyPlatformConfig(buildConfig); - // update platform as per configuration settings - prepare.applyPlatformConfig(); - - return MSBuildTools.findAvailableVersion().then( - function(msbuildTools) { msbuild = msbuildTools; console.log('MSBuildToolsPath: ' + msbuild.path); - return buildTargets(); + return buildTargets(msbuild, buildConfig); + }, function(error) { + return Q.reject(error); }); }; // help/usage function module.exports.help = function help() { console.log(''); - console.log('Usage: build [ --debug | --release ] [--archs=\"<list of architectures...>\"] [--phone | --win]'); - console.log(' --help : Displays this dialog.'); - console.log(' --debug : Builds project in debug mode. (Default)'); - console.log(' --release : Builds project in release mode.'); - console.log(' -r : Shortcut :: builds project in release mode.'); - console.log(' --archs : Builds project binaries for specific chip architectures (`anycpu`, `arm`, `x86`, `x64`).'); + console.log('Usage: build [--debug | --release] [--archs="<list of architectures...>"]'); + console.log(' [--phone | --win] [--packageCertificateKeyFile="key path"]'); + console.log(' [--packageThumbprint="thumbprint"] [--publisherId]'); + console.log(' [--buildConfig="file path"]'); + console.log(' --help : Displays this dialog.'); + console.log(' --debug : Builds project in debug mode. (Default).'); + console.log(' --release : Builds project in release mode.'); + console.log(' -r : (shortcut) Builds project in release mode.'); + console.log(' --archs : Builds project binaries for specific chip'); + console.log(' architectures (`anycpu`, `arm`, `x86`, `x64`).'); console.log(' --phone, --win'); - console.log(' : Specifies, what type of project to build'); + console.log(' : Specifies, what type of project to build.'); + console.log(' --packageCertificateKeyFile : Builds the project using provided certificate.'); + console.log(' --packageThumbprint : Thumbprint associated with the certificate.'); + console.log(' --publisherId : Sets publisher id field in manifest.'); + console.log(' --buildConfig : Sets build settings from configuration file.'); + console.log(''); console.log('examples:'); console.log(' build '); console.log(' build --debug'); console.log(' build --release'); console.log(' build --release --archs="arm x86"'); + console.log(' build --packageCertificateKeyFile="CordovaApp_TemporaryKey.pfx"'); + console.log(' build --buildConfig="build.json"'); --- End diff -- As I mentioned earlier - providing an example with the publisher Id might be useful since publisher id has a very specific syntax.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org