-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathbuild.ps1
37 lines (26 loc) · 828 Bytes
/
build.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
36
37
function Exec
{
[CmdletBinding()]
param(
[Parameter(Position=0,Mandatory=1)][scriptblock]$cmd,
[Parameter(Position=1,Mandatory=0)][string]$errorMessage = ($msgs.error_bad_command -f $cmd)
)
& $cmd
if ($lastexitcode -ne 0) {
throw ("Exec: " + $errorMessage)
}
}
if(Test-Path .\artifacts) { Remove-Item .\artifacts -Force -Recurse }
echo "building..."
exec { & dotnet build DotNet2019.sln -c Release -v q /nologo }
echo "up docker compose"
#exec { & docker-compose -f .\builds\docker-compose-infrastructure.yml up -d }
echo "Running functional tests"
try {
Push-Location -Path .\test\FunctionalTests
exec { & dotnet test}
} finally {
Pop-Location
}
echo "down docker compose"
#exec { & docker-compose -f .\builds\docker-compose-infrastructure.yml down }