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

Improve CLI version checking #1290

Closed
4 tasks done
Xeevis opened this issue Jun 16, 2019 · 2 comments
Closed
4 tasks done

Improve CLI version checking #1290

Xeevis opened this issue Jun 16, 2019 · 2 comments

Comments

@Xeevis
Copy link
Contributor

Xeevis commented Jun 16, 2019

Related to #1113

Currently version check is working with latest NuGet package and compares equality to assembly file version, this brings up problems in some scenarios.

Like when using newer version MyGet nightly build where 0.17.0 is said to be newer than 0.18.0:

image

My proposal is to make the following changes:

  • Attempt to determine exact installed version by parsing the dotnet tool list -g output, with fallback to existing GetCliVersion()
  • Compare versions using the official NuGet.Versioning SemVer implementation to determine the newer one
  • If installed version is a preview, compare it against MyGet nightly builds, those are always latest previews
  • Preview versions cannot be updated with dotnet tool update. Update unlike Install currently lacks the required --version support Unable to update global tool to the latest prerelease version dotnet/sdk#2551, workaround is to uninstall && install. Should be reflected in the WRN.

Thoughts? I'm willing to give this one a shot if accepted.

@hikalkan
Copy link
Member

Thanks for suggestions. If you implement these, please send as a PR.

@hikalkan hikalkan modified the milestone: 0.18 Jun 16, 2019
@hikalkan hikalkan added this to the 0.19 milestone Jun 16, 2019
@hikalkan
Copy link
Member

I added this to the next milestone. However, if you implement it, we can include to v0.18.

@hikalkan hikalkan modified the milestones: 0.19, 0.18 Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants