diff options
author | dotnet-maestro <@dotnet-maestro> | 2019-06-13 16:15:57 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2019-06-13 18:32:22 +0300 |
commit | 8affbbe98dbbe85d78924d1c8b51a29692b0d8cf (patch) | |
tree | 1c3fdbc1110a07b1c82090dd7d42311cdbf19dcc /eng/common/post-build/dotnetsymbol-init.ps1 | |
parent | 20d83c24d6fe412a6afe62652b671526ab7d12cf (diff) |
Update dependencies from https://github.com/dotnet/arcade build 20190612.21
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19312.21
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19312.21
Diffstat (limited to 'eng/common/post-build/dotnetsymbol-init.ps1')
-rw-r--r-- | eng/common/post-build/dotnetsymbol-init.ps1 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/eng/common/post-build/dotnetsymbol-init.ps1 b/eng/common/post-build/dotnetsymbol-init.ps1 new file mode 100644 index 00000000000..e7659b98c8c --- /dev/null +++ b/eng/common/post-build/dotnetsymbol-init.ps1 @@ -0,0 +1,29 @@ +param ( + $dotnetsymbolVersion = $null +) + +$ErrorActionPreference = "Stop" +Set-StrictMode -Version 2.0 + +. $PSScriptRoot\..\tools.ps1 + +$verbosity = "minimal" + +function Installdotnetsymbol ($dotnetsymbolVersion) { + $dotnetsymbolPackageName = "dotnet-symbol" + + $dotnetRoot = InitializeDotNetCli -install:$true + $dotnet = "$dotnetRoot\dotnet.exe" + $toolList = & "$dotnet" tool list --global + + if (($toolList -like "*$dotnetsymbolPackageName*") -and ($toolList -like "*$dotnetsymbolVersion*")) { + Write-Host "dotnet-symbol version $dotnetsymbolVersion is already installed." + } + else { + Write-Host "Installing dotnet-symbol version $dotnetsymbolVersion..." + Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed." + & "$dotnet" tool install $dotnetsymbolPackageName --version $dotnetsymbolVersion --verbosity $verbosity --global + } +} + +Installdotnetsymbol $dotnetsymbolVersion |