forked from psake/PowerShellBuild
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpsakeFile.ps1
More file actions
35 lines (27 loc) · 1.31 KB
/
psakeFile.ps1
File metadata and controls
35 lines (27 loc) · 1.31 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
Import-Module ../../Output/PowerShellBuild -Force
properties {
# Pester can build the module using both scenarios
if (Test-Path -Path 'Variable:\PSBuildCompile') {
$PSBPreference.Build.CompileModule = $global:PSBuildCompile
} else {
$PSBPreference.Build.CompileModule = $true
}
# Always copy these
$PSBPreference.Build.CopyDirectories = ('stuff')
# Don't ever copy these
$PSBPreference.Build.Exclude = ('excludeme.txt', 'excludemealso*', 'dontcopy')
# If compiling, insert headers/footers for entire PSM1 and for each inserted function
$PSBPreference.Build.CompileHeader = '# Module Header' + [Environment]::NewLine
$PSBPreference.Build.CompileFooter = '# Module Footer'
$PSBPreference.Build.CompileScriptHeader = '# Function header'
$PSBPreference.Build.CompileScriptFooter = '# Function footer' + [Environment]::NewLine
# So Pester InModuleScope works
$PSBPreference.Test.ImportModule = $true
$PSBPreference.Test.CodeCoverage.Enabled = $true
$PSBPreference.Test.CodeCoverage.Threshold = 0.0
$PSBPreference.Test.CodeCoverage.OutputFile = 'cc.xml'
# Override the default output directory
$PSBPreference.Build.OutDir = 'Output'
}
task default -depends Build
task Build -FromModule PowerShellBuild -minimumVersion 0.5.0