Skip to content

Fix installation of latest compatible version #1552

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 1 commit into from
Mar 1, 2016

Conversation

rosen-vladimirov
Copy link
Contributor

CLI should install latest compatible version of runtimes, based on it's current version. For example in case CLI's version is "1.6.0", when tns platform add android is called, CLI should install latest 1.6.x version of android runtime, no matter if 1.7.x exists.
This was not working correctly as it was using beta versions, incorrect sorting, etc.
Fix it by using semver methods and always use the @latest tag of the package. In case it doesn't match CLI version, try finding latest matching tag with maxSatisfying method of semver, which dismisses beta versions.

Required for publishing @next in npm.

CLI should install latest compatible version of runtimes, based on it's current version. For example in case CLI's version is "1.6.0", when `tns platform add android` is called, CLI should install latest 1.6.x version of android runtime, no matter if 1.7.x exists.
This was not working correctly as it was using beta versions, incorrect sorting, etc.
Fix it by using semver methods and always use the `@latest` tag of the package. In case it doesn't match CLI version, try finding latest matching tag with maxSatisfying method of semver, which dismisses beta versions.

Required for publishing `@next` in npm.
@rosen-vladimirov rosen-vladimirov self-assigned this Feb 29, 2016
@rosen-vladimirov rosen-vladimirov added this to the 1.6.2 milestone Feb 29, 2016
@ErjanGavalji
Copy link
Contributor

👍

1 similar comment
@Mitko-Kerezov
Copy link
Contributor

👍

rosen-vladimirov added a commit that referenced this pull request Mar 1, 2016
…tection

Fix installation of latest compatible version
@rosen-vladimirov rosen-vladimirov merged commit c15c700 into release Mar 1, 2016
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/fix-versions-detection branch March 1, 2016 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants