dotnet-installer/eng/common/darc-init.ps1

23 lines
781 B
PowerShell
Raw Normal View History

2018-10-22 05:07:26 +00:00
$verbosity = "m"
. $PSScriptRoot\tools.ps1
function InstallDarcCli {
$darcCliPackageName = "microsoft.dotnet.darc"
2018-12-19 20:55:42 +00:00
$dotnetRoot = InitializeDotNetCli -install:$true
$dotnet = "$dotnetRoot\dotnet.exe"
2018-11-08 01:51:56 +00:00
$toolList = Invoke-Expression "& `"$dotnet`" tool list -g"
2018-10-22 05:07:26 +00:00
if ($toolList -like "*$darcCliPackageName*") {
2018-11-08 01:51:56 +00:00
Invoke-Expression "& `"$dotnet`" tool uninstall $darcCliPackageName -g"
2018-10-22 05:07:26 +00:00
}
$toolsetVersion = $GlobalJson.'msbuild-sdks'.'Microsoft.DotNet.Arcade.Sdk'
Write-Host "Installing Darc CLI version $toolsetVersion..."
Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
2018-11-08 01:51:56 +00:00
Invoke-Expression "& `"$dotnet`" tool install $darcCliPackageName --version $toolsetVersion -v $verbosity -g"
2018-10-22 05:07:26 +00:00
}
InstallDarcCli