Skip to content

Instantly share code, notes, and snippets.

@ebicoglu
Last active April 2, 2021 07:37
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ebicoglu/177f48f5fad1bcc49645c0939af4ae76 to your computer and use it in GitHub Desktop.
Save ebicoglu/177f48f5fad1bcc49645c0939af4ae76 to your computer and use it in GitHub Desktop.
Updates ABP CLI and ABP Suite to the latest version (including previews)
Set-PSDebug -Trace 0
$packageName = "volo.abp.cli"
$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
Write-Host "Updating ABP Suite"
abp suite update --preview
Read-Host -Prompt "Press Enter to exit"
@ebicoglu
Copy link
Author

ebicoglu commented Apr 1, 2021

Info:

dotnet tool doesn't have parameter to include the preview versions when you update/install a package.
You need to provide the version parameter to install any preview (RC) version.
I created a feature request to Microsoft to support this functionality.
So we need to find the latest preview version and add this to --version parameter in the command.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment