-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.settings.ps1
44 lines (41 loc) · 2.17 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
$ProjectRoot = $PSScriptRoot
$ModuleName = "Portal"
$ModuleVersion = "0.4.1"
$Source = Join-Path -Path $ProjectRoot -ChildPath "Source"
$Tests = Join-Path -Path $ProjectRoot -ChildPath "Tests"
$Out = Join-Path -Path $ProjectRoot -ChildPath "Out\$ModuleName\$ModuleVersion"
$Docs = Join-Path -Path $ProjectRoot -ChildPath "docs"
@{
# Project
ProjectRoot = $ProjectRoot
# Module
ModuleName = $ModuleName
ModuleVersion = $ModuleVersion
# Source
Source = $Source
SourceHeader = Get-Item -Path "$Source\$ModuleName.Header.ps1"
SourceEnum = Get-ChildItem -Path "$Source\Enum" -Include "*.ps1" -Recurse -File
SourceClasses = Get-ChildItem -Path "$Source\Classes" -Include "*.ps1" -Recurse -File | Sort-Object Name
SourcePrivateFunctions = Get-ChildItem -Path "$Source\Private" -Include "*.ps1" -Recurse -File
SourcePublicFunctions = Get-ChildItem -Path "$Source\Public" -Include "*.ps1" -Recurse -File
#SourceDataFiles = Get-ChildItem -Path "$Source\Data"
SourceManifest = Join-Path -Path $Source -ChildPath "$ModuleName.psd1"
# Tests
Tests = $Tests
TestsFiles = Get-ChildItem -Path $Tests -Include "*.Tests.ps1" -Recurse -File
TestsScriptAnalyzerSettings = Join-Path -Path $Tests -ChildPath "PSScriptAnalyzerSettings.psd1"
TestOut = Join-Path -Path $Tests -ChildPath "TestResults.xml"
# Out
Out = $Out
OutModule = Join-Path -Path $Out -ChildPath "$ModuleName.psm1"
OutManifest = Join-Path -Path $Out -ChildPath "$ModuleName.psd1"
OutEncoding = "utf8" # String
# Docs
Docs = $Docs
DocsHelpOut = Join-Path -Path $Docs -ChildPath "cmdlet-help"
DocsHelpOutEncoding = "UTF-8" # System.Text.Encoding
DocsHelpLocale = "EN-US"
# Publish
PublishApiKeyEnvVar = "{0}_PSGALLERY_API_KEY" -f $ModuleName.ToUpper()
PublishRepository = "PSGallery"
}