-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.settings.ps1
168 lines (130 loc) · 7.57 KB
/
build.settings.ps1
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
###############################################################################
# Customize these properties and tasks for your module.
###############################################################################
Properties {
# ----------------------- Basic properties --------------------------------
# The root directories for the module's docs, src and test.
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
$DocsRootDir = "$PSScriptRoot\xAz.New\docs"
$SrcRootDir = "$PSScriptRoot\xAz.New"
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
$TestRootDir = "$PSScriptRoot\xAz.New\Test"
# The name of your module should match the basename of the PSD1 file.
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
$ModuleName = Get-Item $SrcRootDir/*.psd1 |
Where-Object { $null -ne (Test-ModuleManifest -Path $_ -ErrorAction SilentlyContinue) } |
Select-Object -First 1 | Foreach-Object BaseName
# The $OutDir is where module files and updatable help files are staged for signing, install and publishing.
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
$OutDir = "$PSScriptRoot\Release"
# The local installation directory for the install task. Defaults to your home Modules location.
# The test for $profile is for the Plaster AppVeyor build machine since it doesn't define $profile.
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
$InstallPath = Join-Path (Split-Path $(if ($profile) {$profile} else {$Home}) -Parent) `
"Modules\$ModuleName\$((Test-ModuleManifest -Path $SrcRootDir\$ModuleName.psd1).Version.ToString())"
# Default Locale used for help generation, defaults to en-US.
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
$DefaultLocale = 'en-US'
# Items in the $Exclude array will not be copied to the $OutDir e.g. $Exclude = @('.gitattributes')
# Typically you wouldn't put any file under the src dir unless the file was going to ship with
# the module. However, if there are such files, add their $SrcRootDir relative paths to the exclude list.
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
$Exclude = @()
# ------------------ Script analysis properties ---------------------------
# Enable/disable use of PSScriptAnalyzer to perform script analysis.
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
$ScriptAnalysisEnabled = $false
# When PSScriptAnalyzer is enabled, control which severity level will generate a build failure.
# Valid values are Error, Warning, Information and None. "None" will report errors but will not
# cause a build failure. "Error" will fail the build only on diagnostic records that are of
# severity error. "Warning" will fail the build on Warning and Error diagnostic records.
# "Any" will fail the build on any diagnostic record, regardless of severity.
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
[ValidateSet('Error', 'Warning', 'Any', 'None')]
$ScriptAnalysisFailBuildOnSeverityLevel = 'Error'
# Path to the PSScriptAnalyzer settings file.
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
$ScriptAnalyzerSettingsPath = "$PSScriptRoot\ScriptAnalyzerSettings.psd1"
# ---------------------- Testing properties -------------------------------
# Enable/disable Pester code coverage reporting.
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
$CodeCoverageEnabled = $true
# CodeCoverageFiles specifies the files to perform code coverage analysis on. This property
# acts as a direct input to the Pester -CodeCoverage parameter, so will support constructions
# like the ones found here: https://github.com/pester/Pester/wiki/Code-Coverage.
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
$CodeCoverageFiles = "$SrcRootDir\*.ps1", "$SrcRootDir\*.psm1"
# ----------------------- Misc properties ---------------------------------
# Specifies an output file path to send to Invoke-Pester's -OutputFile parameter.
# This is typically used to write out test results so that they can be sent to a CI
# system like AppVeyor.
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
$TestOutputFile = $null
# Specifies the test output format to use when the TestOutputFile property is given
# a path. This parameter is passed through to Invoke-Pester's -OutputFormat parameter.
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
$TestOutputFormat = "NUnitXml"
}
###############################################################################
# Customize these tasks for performing operations before and/or after file staging.
###############################################################################
# Executes before the StageFiles task.
Task BeforeStageFiles {
}
# Executes after the StageFiles task.
Task AfterStageFiles {
}
###############################################################################
# Customize these tasks for performing operations before and/or after Build.
###############################################################################
# Executes before the BeforeStageFiles phase of the Build task.
Task BeforeBuild {
}
# Executes after the Build task.
Task AfterBuild {
}
###############################################################################
# Customize these tasks for performing operations before and/or after BuildHelp.
###############################################################################
# Executes before the BuildHelp task.
Task BeforeBuildHelp {
}
# Executes after the BuildHelp task.
Task AfterBuildHelp {
}
###############################################################################
# Customize these tasks for performing operations before and/or after BuildUpdatableHelp.
###############################################################################
# Executes before the BuildUpdatableHelp task.
Task BeforeBuildUpdatableHelp {
}
# Executes after the BuildUpdatableHelp task.
Task AfterBuildUpdatableHelp {
}
###############################################################################
# Customize these tasks for performing operations before and/or after GenerateFileCatalog.
###############################################################################
# Executes before the GenerateFileCatalog task.
Task BeforeGenerateFileCatalog {
}
# Executes after the GenerateFileCatalog task.
Task AfterGenerateFileCatalog {
}
###############################################################################
# Customize these tasks for performing operations before and/or after Install.
###############################################################################
# Executes before the Install task.
Task BeforeInstall {
}
# Executes after the Install task.
Task AfterInstall {
}
###############################################################################
# Customize these tasks for performing operations before and/or after Publish.
###############################################################################
# Executes before the Publish task.
Task BeforePublish {
}
# Executes after the Publish task.
Task AfterPublish {
}