File tree Expand file tree Collapse file tree 3 files changed +25
-12
lines changed Expand file tree Collapse file tree 3 files changed +25
-12
lines changed Original file line number Diff line number Diff line change @@ -35,15 +35,22 @@ function Update-GeneratedCode {
35
35
write-host - foreground blue " Generate code...END`n "
36
36
}
37
37
38
- function Start-Build {
38
+ function Start-Build ([ boolean ] $skipUWP = $false ) {
39
39
write-host - foreground blue " Start-Build...`n ---"
40
40
dotnet build -- configuration Release " $root \UnitsNet.sln"
41
41
if ($lastexitcode -ne 0 ) { exit 1 }
42
42
43
- # dontnet CLI does not support WindowsRuntimeComponent project type yet
44
- write-host - foreground yellow " WindowsRuntimeComponent project not yet supported by dotnet CLI, using MSBuild15 instead"
45
- & msbuild " $root \UnitsNet.WindowsRuntimeComponent.sln" / verbosity:minimal / p:Configuration= Release
46
- if ($lastexitcode -ne 0 ) { exit 1 }
43
+ if ($skipUWP -eq $true )
44
+ {
45
+ write-host - foreground yellow " Skipping WindowsRuntimeComponent build by user-specified flag."
46
+ }
47
+ else
48
+ {
49
+ # dontnet CLI does not support WindowsRuntimeComponent project type yet
50
+ write-host - foreground yellow " WindowsRuntimeComponent project not yet supported by dotnet CLI, using MSBuild15 instead"
51
+ & " $msbuild " " $root \UnitsNet.WindowsRuntimeComponent.sln" / verbosity:minimal / p:Configuration= Release
52
+ if ($lastexitcode -ne 0 ) { exit 1 }
53
+ }
47
54
48
55
write-host - foreground blue " Start-Build...END`n "
49
56
}
Original file line number Diff line number Diff line change 1
- <#
1
+ <#
2
2
. SYNOPSIS
3
3
Build, run tests and pack nugets for all Units.NET projects.
4
4
. DESCRIPTION
7
7
8
8
Publishing nugets is handled by nuget-publish.bat and run by the build server
9
9
on the master branch.
10
-
11
- Optional strong name signing .pfx key file to produce signed binaries for the signed nugets.
10
+ . PARAMETER skipUWP
11
+ If flag is set, will skip the UWP (Windows Runtime Component) build step as this requires
12
+ some large, extra Visual Studio features to be installed.
12
13
. EXAMPLE
13
- powershell ./UpdateAssemblyInfo.ps1 c:\UnitsNet_Key.snk
14
+ powershell ./build.ps1
15
+ powershell ./build.ps1 -skipUWP
14
16
15
17
. NOTES
16
18
Author: Andreas Gullberg Larsen
17
- Last modified: June 1, 2017
19
+ Last modified: Jan 21, 2018
18
20
#>
19
21
[CmdletBinding ()]
20
- Param ()
22
+ Param (
23
+ [switch ] $skipUWP
24
+ )
21
25
22
26
remove-module build-functions - ErrorAction SilentlyContinue
23
27
import-module $PSScriptRoot \build-functions .psm1
26
30
Remove-ArtifactsDir
27
31
Start-NugetRestore
28
32
Update-GeneratedCode
29
- Start-Build
33
+ Start-Build $skipUWP
30
34
Start-Tests
31
35
Start-PackNugets
32
36
Compress-ArtifactsAsZip
Original file line number Diff line number Diff line change
1
+ @ echo off
2
+ powershell -ExecutionPolicy Bypass -NoProfile -File %~dp0 \Build\build.ps1 -skipUWP
You can’t perform that action at this time.
0 commit comments