diff options
author | Juan Sebastian Hoyos Ayala <juan.hoyos@microsoft.com> | 2018-11-01 13:59:59 -0700 |
---|---|---|
committer | Juan Sebastian Hoyos Ayala <juan.hoyos@microsoft.com> | 2018-11-01 16:14:03 -0700 |
commit | 84387fa5f788603ff6eb85f5a0c6c954bd90d362 (patch) | |
tree | a877e42b21915fb859131f9933e58c537c0c97b1 /eng/common/darc-init.ps1 | |
parent | df0cd2cd2c026af3aff78206bed6b45429dc9e19 (diff) | |
download | coreclr-84387fa5f788603ff6eb85f5a0c6c954bd90d362.tar.gz coreclr-84387fa5f788603ff6eb85f5a0c6c954bd90d362.tar.bz2 coreclr-84387fa5f788603ff6eb85f5a0c6c954bd90d362.zip |
Add base arcade scripts and versioning files
Diffstat (limited to 'eng/common/darc-init.ps1')
-rw-r--r-- | eng/common/darc-init.ps1 | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/eng/common/darc-init.ps1 b/eng/common/darc-init.ps1 new file mode 100644 index 0000000000..af182d8f84 --- /dev/null +++ b/eng/common/darc-init.ps1 @@ -0,0 +1,21 @@ +$verbosity = "m" +. $PSScriptRoot\tools.ps1 + +function InstallDarcCli { + $darcCliPackageName = "microsoft.dotnet.darc" + $dotnet = "$env:DOTNET_INSTALL_DIR\dotnet.exe" + $toolList = Invoke-Expression "& `"$dotnet`" tool list -g" + + if ($toolList -like "*$darcCliPackageName*") { + Invoke-Expression "& `"$dotnet`" tool uninstall $darcCliPackageName -g" + } + + $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." + Invoke-Expression "& `"$dotnet`" tool install $darcCliPackageName --version $toolsetVersion -v $verbosity -g" +} + +InitializeTools +InstallDarcCli |