forked from PHOENIXCONTACT/MORYX-AbstractionLayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Build.ps1
63 lines (47 loc) · 1.09 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
param (
[switch]$Build,
[switch]$SmokeTests,
[switch]$UnitTests,
[switch]$IntegrationTests,
[switch]$SystemTests,
[switch]$CoverReport,
[switch]$GenerateDocs,
[switch]$Pack,
[switch]$Publish
)
# Load Toolkit
. ".build\BuildToolkit.ps1"
# Set MSBuild to latest version
$MsBuildVersion = "latest";
# Initialize Toolkit
Invoke-Initialize -Version (Get-Content "VERSION");
if ($Build) {
Invoke-Build ".\AbstractionLayer.sln"
Invoke-Build ".\AbstractionLayer.UI.sln"
}
if ($SmokeTests) {
$runtimePath = "$RootPath\src\StartProject\bin\$env:MORYX_BUILD_CONFIG\net45\StartProject.exe";
Invoke-SmokeTest $runtimePath 4 6000
}
if ($UnitTests) {
Invoke-CoverTests -SearchFilter "*.Tests.csproj"
}
if ($IntegrationTests) {
Invoke-CoverTests -SearchFilter "*.IntegrationTests.csproj"
}
if ($SystemTests) {
Invoke-Nunit -SearchFilter "*.SystemTests.csproj"
}
if ($CoverReport) {
Invoke-CoverReport
}
if ($GenerateDocs) {
Invoke-DocFx
}
if ($Pack) {
Invoke-PackAll -Symbols
}
if ($Publish) {
Invoke-Publish
}
Write-Host "Success!"