mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-13 01:42:28 +00:00
Update deploy.ps1 to remove trailing whitespaces from psd1
This commit is contained in:
parent
a4c1886a23
commit
5421febdd1
1 changed files with 3 additions and 1 deletions
|
|
@ -64,6 +64,7 @@ $FunctionPath = "$PSScriptRoot\Functions"
|
||||||
$OutputDirectory = "$PSScriptRoot\$ModuleName"
|
$OutputDirectory = "$PSScriptRoot\$ModuleName"
|
||||||
$PSD1OutputPath = "$OutputDirectory\$ModuleName.psd1"
|
$PSD1OutputPath = "$OutputDirectory\$ModuleName.psd1"
|
||||||
$PSM1OutputPath = "$OutputDirectory\$ModuleName.psm1"
|
$PSM1OutputPath = "$OutputDirectory\$ModuleName.psm1"
|
||||||
|
$PS1FunctionFiles = Get-ChildItem $FunctionPath -Filter "*.ps1" -Recurse | Sort-Object Name
|
||||||
|
|
||||||
|
|
||||||
Write-Host "Removing whitespace from files" -ForegroundColor Green
|
Write-Host "Removing whitespace from files" -ForegroundColor Green
|
||||||
|
|
@ -71,7 +72,6 @@ Invoke-ScriptAnalyzer -Path $FunctionPath -IncludeRule 'PSAvoidTrailingWhitespac
|
||||||
|
|
||||||
|
|
||||||
Write-Host "Concatenating [$($PS1FunctionFiles.Count)] PS1 files from $FunctionPath"
|
Write-Host "Concatenating [$($PS1FunctionFiles.Count)] PS1 files from $FunctionPath"
|
||||||
$PS1FunctionFiles = Get-ChildItem $FunctionPath -Filter "*.ps1" -Recurse | Sort-Object Name
|
|
||||||
|
|
||||||
"" | Out-File -FilePath $ConcatenatedFilePath -Encoding utf8
|
"" | Out-File -FilePath $ConcatenatedFilePath -Encoding utf8
|
||||||
|
|
||||||
|
|
@ -165,6 +165,8 @@ if (-not (Test-Path $OutputDirectory)) {
|
||||||
Write-Host " Copying psd1"
|
Write-Host " Copying psd1"
|
||||||
Copy-Item -Path "$PSScriptRoot\$ModuleName.psd1" -Destination $PSD1OutputPath -Force
|
Copy-Item -Path "$PSScriptRoot\$ModuleName.psd1" -Destination $PSD1OutputPath -Force
|
||||||
|
|
||||||
|
Write-Host " Removing trailing whitespaces from psd1"
|
||||||
|
Invoke-ScriptAnalyzer -Path $PSD1OutputPath -IncludeRule 'PSAvoidTrailingWhitespace' -Fix
|
||||||
|
|
||||||
Write-Host " Copying psm1"
|
Write-Host " Copying psm1"
|
||||||
Copy-Item -Path $ConcatenatedFilePath -Destination $PSM1OutputPath -Force
|
Copy-Item -Path $ConcatenatedFilePath -Destination $PSM1OutputPath -Force
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue