-
Notifications
You must be signed in to change notification settings - Fork 407
Expand file tree
/
Copy pathbuild.ps1
More file actions
40 lines (35 loc) · 1.01 KB
/
build.ps1
File metadata and controls
40 lines (35 loc) · 1.01 KB
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
<#
.SYNOPSIS
Build, run tests and pack nugets for all Units.NET projects.
.DESCRIPTION
This file builds everything and is run on the build server as part of
building, testing and packing nugets for all master commits and pull requests.
Publishing nugets is handled by nuget-publish.bat and run by the build server
on the master branch.
.EXAMPLE
powershell ./build.ps1
powershell ./build.ps1 -IncludeNanoFramework
.NOTES
Author: Andreas Gullberg Larsen
Last modified: Jan 21, 2018
#>
[CmdletBinding()]
Param(
[switch] $IncludeNanoFramework
)
remove-module build-functions -ErrorAction SilentlyContinue
import-module $PSScriptRoot\build-functions.psm1
try {
& "$PSScriptRoot/init.ps1" # Ensure tools are downloaded
Remove-ArtifactsDir
Update-GeneratedCode
Start-Build -IncludeNanoFramework $IncludeNanoFramework
Start-Tests
Start-PackNugets
Compress-ArtifactsAsZip
}
catch {
$myError = $_.Exception.ToString()
write-error "Failed to build.`n---`n$myError' ]"
exit 1
}