-
-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathbuild.properties.ps1
More file actions
137 lines (105 loc) · 5.51 KB
/
build.properties.ps1
File metadata and controls
137 lines (105 loc) · 5.51 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
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
BuildHelpers\Set-BuildEnvironment -Force
$outDir = [IO.Path]::Combine($env:BHProjectPath, 'Output')
$moduleVersion = (Import-PowerShellDataFile -Path $env:BHPSModuleManifest).ModuleVersion
[ordered]@{
General = @{
# Root directory for the project
ProjectRoot = $env:BHProjectPath
# Root directory for the module
SrcRootDir = $env:BHPSModulePath
# The name of the module. This should match the basename of the PSD1 file
ModuleName = $env:BHProjectName
# Module version
ModuleVersion = $moduleVersion
# Module manifest path
ModuleManifestPath = $env:BHPSModuleManifest
}
Build = @{
Dependencies = @('StageFiles', 'BuildHelp')
# Output directory when building a module
OutDir = $outDir
# Module output directory
# This will be computed in 'Initialize-PSBuild' so we can allow the user to
# override the top-level 'OutDir' above and compute the full path to the module internally
ModuleOutDir = $null
# Controls whether to "compile" module into single PSM1 or not
CompileModule = $false
# List of directories that if CompileModule is $true, will be concatenated into the PSM1
CompileDirectories = @('Enum', 'Classes', 'Private', 'Public')
# List of directories that will always be copied "as is" to output directory
CopyDirectories = @()
# List of files (regular expressions) to exclude from output directory
Exclude = @()
}
Test = @{
# Enable/disable Pester tests
Enabled = $true
# Directory containing Pester tests
RootDir = [IO.Path]::Combine($env:BHProjectPath, 'tests')
# 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
# This path is relative to the directory containing Pester tests
OutputFile = [IO.Path]::Combine($env:BHProjectPath, 'testResults.xml')
# 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.
OutputFormat = 'NUnitXml'
ScriptAnalysis = @{
# Enable/disable use of PSScriptAnalyzer to perform script analysis
Enabled = $true
# 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.
FailBuildOnSeverityLevel = 'Error'
# Path to the PSScriptAnalyzer settings file.
SettingsPath = [IO.Path]::Combine($PSScriptRoot, 'ScriptAnalyzerSettings.psd1')
}
# Import module from OutDir prior to running Pester tests.
ImportModule = $false
CodeCoverage = @{
# Enable/disable Pester code coverage reporting.
Enabled = $false
# Fail Pester code coverage test if below this threshold
Threshold = .75
# 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://pester.dev/docs/usage/code-coverage.
Files = @()
# Path to write code coverage report to
OutputFile = [IO.Path]::Combine($env:BHProjectPath, 'codeCoverage.xml')
# The code coverage output format to use
OutputFileFormat = 'JaCoCo'
}
}
Help = @{
# Path to updateable help CAB
UpdatableHelpOutDir = [IO.Path]::Combine($outDir, 'UpdatableHelp')
# Default Locale used for help generation, defaults to en-US
# Get-UICulture doesn't return a name on Linux so default to en-US
DefaultLocale = if (-not (Get-UICulture).Name) { 'en-US' } else { (Get-UICulture).Name }
# Convert project readme into the module about file
ConvertReadMeToAboutHelp = $false
}
Docs = @{
# Directory PlatyPS markdown documentation will be saved to
RootDir = [IO.Path]::Combine($env:BHProjectPath, 'docs')
# Whether to overwrite existing markdown files and use comment based help as the source of truth
Overwrite = $false
}
Publish = @{
# PowerShell repository name to publish modules to
PSRepository = 'PSGallery'
# API key to authenticate to PowerShell repository with
PSRepositoryApiKey = $env:PSGALLERY_API_KEY
# Credential to authenticate to PowerShell repository with
PSRepositoryCredential = $null
}
}
# Enable/disable generation of a catalog (.cat) file for the module.
# [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
# $catalogGenerationEnabled = $true
# # Select the hash version to use for the catalog file: 1 for SHA1 (compat with Windows 7 and
# # Windows Server 2008 R2), 2 for SHA2 to support only newer Windows versions.
# [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
# $catalogVersion = 2