You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: build.ps1
+24-16Lines changed: 24 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,9 @@
35
35
.PARAMETERClean
36
36
Cleans the build folder ./bin and rebuilds the assemblies.
37
37
38
+
.PARAMETERConfiguration
39
+
The configuration used to build the assemblies. Only used in combination with -Clean. Defaults to Release.
40
+
38
41
.PARAMETERLockedRestore
39
42
Restore nuget packages using the nuget lock file. Useful only for CI.
40
43
@@ -45,12 +48,17 @@
45
48
$env:PESTER_BUILD_INLINE=1 environment variable is used to force inlining in files that don't provide
46
49
the -Inline parameter. When this gets stuck, and you see your module inline even when it should not,
47
50
use -Inline:$false to reset it to 0.
51
+
52
+
.PARAMETERInline
53
+
Builds the module as a single Pester.psm1-file, instead of dot-sourcing the files. This is the mode used in release build.
48
54
#>
49
55
50
56
[CmdletBinding()]
51
57
param (
52
58
[switch] $Load,
53
59
[switch] $Clean,
60
+
[ValidateSet('Debug','Release')]
61
+
[string] $Configuration='Release',
54
62
[switch] $LockedRestore,
55
63
[switch] $Inline,
56
64
[switch] $Import
@@ -60,7 +68,7 @@ $ErrorActionPreference = 'Stop'
60
68
Get-Module Pester |Remove-Module
61
69
62
70
if ($Clean-and$PSVersionTable.PSVersion-lt [version]'5.1') {
63
-
throw"Clean build of Pester requires PowerShell 5.1 or greater. If you have already compiled the assemblies and only modified powershell-files, try calling ./build.ps1 without -Clean."
71
+
throw'Clean build of Pester requires PowerShell 5.1 or greater. If you have already compiled the assemblies and only modified powershell-files, try calling ./build.ps1 without -Clean.'
64
72
}
65
73
66
74
if ($Clean-and (Test-Path"$PSScriptRoot/bin")) {
@@ -71,16 +79,16 @@ if ($Clean) {
71
79
# Import-LocalizedData (and ModuleVersion-property) used as workaround due to unknown error on PS3 build with Test-ModuleManifest
72
80
# and because Test-ModuleManifest needs the psd1 and psm1 to be complete, but we want to generate help for config from the type
73
81
# so we need to build up here, and not after the module build, so xml based solution is better than one that validates the manifest
0 commit comments