/
createrunsettings.ps1
35 lines (29 loc) · 1.04 KB
/
createrunsettings.ps1
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
30
31
32
33
34
35
[CmdletBinding(PositionalBinding=$false)]
param (
[switch]$release = $false)
Set-StrictMode -version 2.0
$ErrorActionPreference = "Stop"
try {
. (Join-Path $PSScriptRoot "build-utils.ps1")
Push-Location $repoDir
Write-Host "Repo Dir $repoDir"
Write-Host "Binaries Dir $binariesDir"
$buildConfiguration = if ($release) { "Release" } else { "Debug" }
$configDir = Join-Path (Join-Path $binariesDir "VSSetup") $buildConfiguration
$optProfToolDir = Get-PackageDir "Roslyn.OptProf.RunSettings.Generator"
$optProfToolExe = Join-Path $optProfToolDir "tools\roslyn.optprof.runsettings.generator.exe"
$configFile = Join-Path $repoDir "build\config\optprof.json"
$outputFolder = Join-Path $configDir "Insertion\RunSettings"
$optProfArgs = "--configFile $configFile --outputFolder $outputFolder --buildNumber 28302.01 "
Exec-Console $optProfToolExe $optProfArgs
exit 0
}
catch {
Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
exit 1
}
finally {
Pop-Location
}