forked from opentracing-contrib/csharp-netcore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlaunch-sample.ps1
33 lines (26 loc) · 1.03 KB
/
launch-sample.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
[CmdletBinding(PositionalBinding = $false)]
param(
[string] $Framework = "netcoreapp2.1"
)
dotnet build
if ($LASTEXITCODE -ne 0) { throw "build error" }
Write-Host "Launching samples with framework $Framework"
Start-Process `
-FilePath powershell.exe `
-ArgumentList @( "dotnet run -f $Framework --no-build; Read-Host 'Press enter to exit'" ) `
-WorkingDirectory "samples\CustomersApi"
Start-Process `
-FilePath powershell.exe `
-ArgumentList @( "dotnet run -f $Framework --no-build; Read-Host 'Press enter to exit'" ) `
-WorkingDirectory "samples\OrdersApi"
Start-Sleep -Seconds 2
Start-Process `
-FilePath powershell.exe `
-ArgumentList @( "dotnet run -f $Framework --no-build; Read-Host 'Press enter to exit'" ) `
-WorkingDirectory "samples\FrontendWeb"
if ($Framework -ne "netcoreapp2.0") {
Start-Process `
-FilePath powershell.exe `
-ArgumentList @( "dotnet run -f $Framework --no-build; Read-Host 'Press enter to exit'" ) `
-WorkingDirectory "samples\TrafficGenerator"
}