-
-
Notifications
You must be signed in to change notification settings - Fork 188
Expand file tree
/
Copy pathpsakeFile.ps1
More file actions
46 lines (39 loc) · 1.62 KB
/
Copy pathpsakeFile.ps1
File metadata and controls
46 lines (39 loc) · 1.62 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
41
42
43
44
45
46
Properties {
# PSKoans stages files without compiling to a single PSM1
$PSBPreference.Build.CompileModule = $false
# Help generation
$PSBPreference.Help.DefaultLocale = 'en-US'
# Test configuration -- the module must be imported from the staged output before
# Pester runs since the test suite expects `PSKoans` to already be loaded/resolvable
$PSBPreference.Test.RootDir = Join-Path $PSScriptRoot 'Tests'
$PSBPreference.Test.ImportModule = $true
$PSBPreference.Test.OutputFile = 'out/testResults.xml'
$PSBPreference.Test.OutputFormat = 'JUnitXml'
$PSBPreference.Test.ScriptAnalysis.Enabled = $true
$PSBPreference.Test.ScriptAnalysis.FailBuildOnSeverityLevel = 'Error'
$PSBPreference.Test.CodeCoverage.Enabled = $false
$PSBPreference.Publish.PSRepositoryApiKey = $env:PSGALLERY_API_KEY
}
# The module manifest's FormatsToProcess entry (PSKoans.format.ps1xml) is generated
# from ./formatting via EZOut and is gitignored -- it must exist before the module
# can be imported at all, so generate it ahead of staging.
Task GenerateFormatData -Depends Clean {
& (Join-Path $PSBPreference.General.ProjectRoot 'PSKoans.ezformat.ps1')
} -Description 'Generates PSKoans.format.ps1xml from ./formatting'
$PSBStageFilesDependency = @('Clean', 'GenerateFormatData')
$PSBBuildDependency = @('StageFiles')
Task Default -Depends Test
# PowerShellBuild adds the following tasks:
# - Init
# - Clean
# - StageFiles
# - Build
# - Analyze
# - Pester
# - Test
# - BuildHelp
# - GenerateMarkdown
# - GenerateMAML
# - GenerateUpdatableHelp
# - Publish
Task Test -FromModule PowerShellBuild -MinimumVersion '0.7.3'