Skip to content

Fix several issues in @next version #2591

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

Merged
merged 4 commits into from
Mar 8, 2017
Merged

Conversation

rosen-vladimirov
Copy link
Contributor

Each commit fixes different issue, so each commit can be checked on its own.

Fix adding of invalid platform

When user tries to add invalid platform, CLI should prints user-friendly
message. Instead it fails that cannot read getPlatformData of
undefined. The reason is a change in platforms-data getPlatformsData
method. Fix it to return undefined when there's no platform specific
data. This way the code will detect the invalid platform and will fail
with user-friendly message.
Fixes #2587

Fix specifiying --sdk on platform add

During adding of Android platform, users can specify targetSdk via
--sdk command line option. This has been broken in previous commit.
As our services should not rely on $options, sdk must be passed as
parameter whenever it could be used. It turns out some common methods
(addPlatform, preparePlatform) rely on platform specific data - sdk,
provision, etc. In order to handle this without adding new arguments,
introudce IPlatformSpecificData interface and use it in al methods
where we have to pass some of the platform specific data required for
preparing of the project.
Fixes: #2588

Pass android specific options for emulate command

In case you want to use tns emulate android --release, several android
specific options should be passed and used by the service. Even when
they are passed on the command line, we did not pass them to the
service. Pass required options, so the release build will be
successfully signed.
Fixes: #2589

Fix livesync watch operations

LiveSync provider that detects how to process the files, needs the
projectData. However we had not passed it and the code fails. Pass the
data wherever its needed. This fixes livesync operations.
Fixes: #2590

When user tries to add invalid platform, CLI should prints user-friendly
message. Instead it fails that cannot read `getPlatformData` of
`undefined`. The reason is a change in platforms-data `getPlatformsData`
method. Fix it to return undefined when there's no platform specific
data. This way the code will detect the invalid platform and will fail
with user-friendly message.
During adding of Android platform, users can specify targetSdk via
`--sdk` command line option. This has been broken in previous commit.
As our services should not rely on `$options`, sdk must be passed as
parameter whenever it could be used. It turns out some common methods
(addPlatform, preparePlatform) rely on platform specific data - sdk,
provision, etc. In order to handle this without adding new arguments,
introudce IPlatformSpecificData interface and use it in al methods
where we have to pass some of the platform specific data required for
preparing of the project.
In case you want to use `tns emulate android --release`, several android
specific options should be passed and used by the service. Even when
they are passed on the command line, we did not pass them to the
service. Pass required options, so the release build will be
successfully signed.
LiveSync provider that detects how to process the files, needs the
projectData. However we had not passed it and the code fails. Pass the
data wherever its needed. This fixes livesync operations.
Copy link
Contributor

@Mitko-Kerezov Mitko-Kerezov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems okay to me

@rosen-vladimirov rosen-vladimirov merged commit 00b80f7 into master Mar 8, 2017
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/fix-issues branch March 8, 2017 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants