Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dotnetsymbol-init.ps1 « post-build « common « eng - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e7659b98c8c30081f37356a55fa893acf671fea2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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