New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TIMOB-24750] Only configure target platform #8
Conversation
lib/titanium.js
Outdated
@@ -52,7 +52,8 @@ exports.commonOptions = function (logger, config) { | |||
}; | |||
|
|||
exports.platformOptions = function (logger, config, cli, commandName, finished) { | |||
var result = {}; | |||
var result = {}, | |||
targetPlatform = cli.argv['platform'] || cli.argv['p']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to reference these using brackets.
lib/titanium.js
Outdated
@@ -75,6 +76,12 @@ exports.platformOptions = function (logger, config, cli, commandName, finished) | |||
// for each platform, fetch their specific flags/options | |||
async.parallel(manifest.platforms.map(function (platform) { | |||
return function (callback) { | |||
|
|||
// only configure target platform | |||
if (targetPlatform && platform != targetPlatform) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use strict equality: !==
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks the help command. If you do ti build -p ios --help
, it does not display the complete help for the build command. You need to check if -h
or --help
was set. I'm not sure off the top of my head how this is treated. Maybe commandName
is set to help
? Maybe there's a boolean cli.argv.help
? You'll have to poke around.
|
Looks good! APPROVED! |
TEST CASE
windows
orios
NOTES: Unfortunately
cli.argv.platform
is not defined at this point in the process