[TIMOB-20519] '--project dir .' causes module build to fail
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-03-07T20:50:38.000+0000 |
Affected Version/s | Release 5.2.1 |
Fix Version/s | Release 5.2.1 |
Components | Tooling |
Labels | qe-5.2.1 |
Reporter | Eric Wieber |
Assignee | Chris Barber |
Created | 2016-03-04T22:10:57.000+0000 |
Updated | 2016-03-07T22:00:16.000+0000 |
Description
When specifying
--project-dir .
when trying to build a module, the build will fail.
*Steps to reproduce issue*
1. Try to build a module with ti build -p ios --project-dir . -b
*Actual Results*
The build fails with:
[ERROR] Unable to find "undefined" module
*Expected Results*
The build succeeds
There are two things that need to be done.
Change the order of the
\-\-platform
and\-\-project\-dir
options in https://github.com/appcelerator/titanium_mobile/blob/master/cli/commands/build.js. Currently\-\-project\-dir
is validated first, then\-\-platform
. If we swap this, thencli.argv.platform
will be set when the\-\-project\-dir
validation runs.Normalize the platform name in the module's manifest which is done here: https://github.com/appcelerator/titanium_mobile/blob/master/node_modules/titanium-sdk/lib/titanium.js#L359. This is done like this:
Master PR: https://github.com/appcelerator/titanium_mobile/pull/7806 5_2_X PR: https://github.com/appcelerator/titanium_mobile/pull/7807 5_3_X PR: https://github.com/appcelerator/titanium_mobile/pull/7808
PR merged.
Verified fixed, using: MacOS 10.11.3 (15D21) Studio 4.5.0.201602170821 Ti SDK 5.2.1.v20160307134704 Appc NPM 4.2.4.2 Appc CLI 5.2.1-11 Alloy 1.7.35 Xcode 7.2 (7C68) Able to successfully build modules using
--project-dir .
and--platform
in the command, in any order.