Skip to content
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-20519] If --platform is not explicitly set, then automatically… #7806

Merged
merged 1 commit into from
Mar 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 10 additions & 3 deletions cli/commands/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,14 @@ exports.config = function config(logger, config, cli) {

var manifest = cli.manifest = ti.loadModuleManifest(logger, path.join(projectDir, 'manifest'));

timodule.properties || (timodule.properties = {});
// if they didn't explicitly set --platform and we have a platform in the manifest,
// then just use that and skip the platform prompting
if (!cli.argv.platform && manifest.platform) {
cli.argv.platform = ti.resolvePlatform(manifest.platform);
conf.options.platform.required = false;
}

// make sure the module manifest is sane
ti.validateModuleManifest(logger, cli, manifest);
timodule.properties || (timodule.properties = {});

cli.argv.type = 'module';

Expand Down Expand Up @@ -235,6 +239,9 @@ exports.validate = function validate(logger, config, cli) {
// Determine if the project is an app or a module, run appropriate build command
if (cli.argv.type === 'module') {

// make sure the module manifest is sane
ti.validateModuleManifest(logger, cli, cli.manifest);

return function (finished) {
logger.log.init(function () {
var result = ti.validatePlatformOptions(logger, config, cli, 'buildModule');
Expand Down
4 changes: 2 additions & 2 deletions node_modules/titanium-sdk/lib/titanium.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.