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

Feature Request: Install or update to the latest including preview version without providing the version parameter #16669

Open
ebicoglu opened this issue Apr 1, 2021 · 2 comments
Milestone

Comments

@ebicoglu
Copy link

ebicoglu commented Apr 1, 2021

When you want to update or install a dotnet tool you need to explicitly provide the version which doesn't work in our DevOps environment. Add a new parameter like --preview to update/install the latest preview version.

dotnet tool update -g dotnet-ef --preview
dotnet tool install -g dotnet-ef --preview

Otherwise, our DevOps engineer is struggling to parse the output of the dotnet tool search command. We always run the latest dotnet tool including preview versions. This is a must for our own dotnet global tools like Volo.Abp.Cli

See what we are doing to be able to update to the latest preview version of any dotnet tool package:

$packageName = "dotnet-ef"
$output = dotnet tool search $packageName --prerelease --take 1
$outputString = ("" + $output)
$indexOfVersionLine = $outputString.IndexOf($packageName)
$latestVersion = $outputString.substring($indexOfVersionLine + $packageName.length).trim().split(" ")[0].trim()

Write-Host "Updating "$packageName" to" $latestVersion
dotnet tool update -g $packageName --version $latestVersion

A related question about this on StackOverflow: https://stackoverflow.com/a/66901668/1767482

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Request triage from a team member label Apr 1, 2021
@ebicoglu ebicoglu changed the title Feature Request: Install or update preview version Feature Request: Install or update to preview version Apr 1, 2021
@ebicoglu ebicoglu changed the title Feature Request: Install or update to preview version Feature Request: Install or update to preview version without providing the version parameter Apr 2, 2021
@ebicoglu ebicoglu changed the title Feature Request: Install or update to preview version without providing the version parameter Feature Request: Install or update to the latest including preview version without providing the version parameter Apr 2, 2021
@dsplaisted
Copy link
Member

@wli3 Did we have another issue covering this?

@dsplaisted dsplaisted removed their assignment Jul 30, 2021
@dsplaisted dsplaisted added needs team triage Requires a full team discussion and removed untriaged Request triage from a team member labels Jul 30, 2021
@marcpopMSFT marcpopMSFT removed the needs team triage Requires a full team discussion label Aug 4, 2021
@marcpopMSFT marcpopMSFT added this to the 7.0.1xx milestone Aug 4, 2021
@marcpopMSFT marcpopMSFT modified the milestones: 7.0.1xx, Backlog Nov 16, 2022
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

3 participants