-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.ps1
30 lines (24 loc) · 1.02 KB
/
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
param(
[Parameter(Mandatory = $True)] [string] $Version,
[switch] $Pack
)
$ErrorActionPreference = "Stop"
Write-Host -ForegroundColor Yellow "******** Version $Version ********"
Write-Host -ForegroundColor Yellow "******** Build samples ********"
Get-ChildItem samples\**\*.sln -Recurse | %{
msbuild $_ -p:Configuration=Release -t:rebuild -restore
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
}
Write-Host -ForegroundColor Yellow "******** Build MvvmMicro ********"
if ($Pack) {
msbuild -p:Configuration=Release -restore -t:rebuild -t:MvvmMicro:pack `
-p:PackageOutputPath="$(Get-Location)\package" `
-p:Version=$Version
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
} else {
msbuild -p:Configuration=Release -t:rebuild -restore -p:Version=$Version
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
}
Write-Host -ForegroundColor Yellow "******** Run tests ********"
dotnet test --configuration Release --no-build --verbosity normal
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }