Skip to content

Commit bffb4f2

Browse files
committed
Support PSFormatdata
1 parent 6fb9714 commit bffb4f2

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"ProjectName": "ModuleTools",
33
"Description": "ModuleTools is a versatile, standalone PowerShell module builder. Create anything from simple to robust modules with ease. Built for CICD and Automation.",
4-
"Version": "1.2.1",
4+
"Version": "1.2.4-preview",
55
"copyResourcesToModuleRoot": false,
66
"Manifest": {
77
"Author": "Manjunath Beli",

src/private/Build-Module.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
function Build-Module {
2-
Write-Verbose 'Buidling module psm1 file'
32
$data = Get-MTProjectInfo
3+
$MTBuildVersion = (Get-Command Invoke-MTBuild).Version
4+
Write-Verbose "Running ModuleTols Version: $MTBuildVersion"
5+
Write-Verbose 'Buidling module psm1 file'
46
Test-ProjectSchema -Schema Build | Out-Null
57

68
$sb = [System.Text.StringBuilder]::new()

src/private/Build.Manifest.ps1

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ function Build-Manifest {
1212
$aliasToExport += Get-AliasInFunctionFromFile -filePath $_
1313
}
1414

15+
## Import Formatting (if any)
16+
$FormatsToProcess = @()
17+
Get-ChildItem -Path $data.ResourcesDir -File -Filter '*.ps1xml' -ErrorAction SilentlyContinue | ForEach-Object {
18+
$FormatsToProcess += $_.Name
19+
}
20+
1521
$ManfiestAllowedParams = (Get-Command New-ModuleManifest).Parameters.Keys
1622
$sv = [semver]$data.Version
1723
$ParmsManifest = @{
@@ -21,8 +27,10 @@ function Build-Manifest {
2127
AliasesToExport = $aliasToExport
2228
RootModule = "$($data.ProjectName).psm1"
2329
ModuleVersion = [version]$sv
30+
FormatsToProcess = $FormatsToProcess
2431
}
25-
32+
33+
## Release lable
2634
if ($sv.PreReleaseLabel) {
2735
$ParmsManifest['Prerelease'] = $sv.PreReleaseLabel
2836
}

0 commit comments

Comments
 (0)