Skip to content

Commit f4cd2a6

Browse files
🩹[Patch] Use Format-ModuleManifest from Utilities (#15)
- Move tests into tests folder - Use Format-ModuleManifest from Utilities
1 parent 0e71e95 commit f4cd2a6

File tree

6 files changed

+3
-69
lines changed

6 files changed

+3
-69
lines changed

.github/workflows/Action-Test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,7 @@ jobs:
2121
GITHUB_TOKEN: ${{ github.token }}
2222
with:
2323
Name: PSModule
24+
ModulePath: tests/outputs/modules
25+
DocsPath: tests/outputs/docs
2426
APIKey: ${{ secrets.APIKEY }}
2527
WhatIf: true

scripts/helpers/PSScriptAnalyzer.Tests.psd1

Lines changed: 0 additions & 56 deletions
This file was deleted.

scripts/helpers/Publish-PSModule.ps1

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -306,24 +306,12 @@ function Publish-PSModule {
306306
Write-Verbose "Prerelease is: [$($newVersion.Prerelease)]"
307307
Update-ModuleManifest -Path $manifestFilePath -Prerelease $($newVersion.Prerelease) -Verbose:$false
308308
}
309-
310-
#region Format manifest file
311-
$manifestContent = Get-Content -Path $manifestFilePath
312-
$manifestContent = $manifestContent | ForEach-Object { $_ -replace '#.*' }
313-
$manifestContent = $manifestContent | ForEach-Object { $_.TrimEnd() }
314-
$manifestContent = $manifestContent | Where-Object { $_ | IsNotNullOrEmpty }
315-
$manifestContent | Out-File -FilePath $manifestFilePath -Encoding utf8BOM -Force
316-
317-
$manifestContent = Get-Content -Path $manifestFilePath -Raw
318-
$settings = (Join-Path -Path $PSScriptRoot 'PSScriptAnalyzer.Tests.psd1')
319-
Invoke-Formatter -ScriptDefinition $manifestContent -Settings $settings |
320-
Out-File -FilePath $manifestFilePath -Encoding utf8BOM -Force
309+
Format-ModuleManifest -Path $manifestFilePath
321310
Stop-LogGroup
322311

323312
Start-LogGroup 'Format manifest file - Result'
324313
Show-FileContent -Path $manifestFilePath
325314
Stop-LogGroup
326-
#endregion Format manifest file
327315

328316
#endregion Update module manifest
329317

File renamed without changes.

0 commit comments

Comments
 (0)