-
Notifications
You must be signed in to change notification settings - Fork 74
/
launch-sample.ps1
34 lines (26 loc) · 1.09 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
34
[CmdletBinding(PositionalBinding = $false)]
param(
[ValidateSet("net7.0", "net6.0", "netcoreapp3.1")]
[string] $Framework = "net6.0"
)
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\$Framework\CustomersApi"
Start-Sleep -Seconds 2
Start-Process `
-FilePath powershell.exe `
-ArgumentList @( "dotnet run -f $Framework --no-build; Read-Host 'Press enter to exit'" ) `
-WorkingDirectory "samples\$Framework\OrdersApi"
Start-Sleep -Seconds 5
Start-Process `
-FilePath powershell.exe `
-ArgumentList @( "dotnet run -f $Framework --no-build; Read-Host 'Press enter to exit'" ) `
-WorkingDirectory "samples\$Framework\FrontendWeb"
Start-Process `
-FilePath powershell.exe `
-ArgumentList @( "dotnet run -f $Framework --no-build; Read-Host 'Press enter to exit'" ) `
-WorkingDirectory "samples\$Framework\TrafficGenerator"