From eb4d0eeb3bc010184f08fda22b9f4e5c11aed42f Mon Sep 17 00:00:00 2001 From: Ben Claussen Date: Mon, 13 Mar 2023 09:49:31 -0400 Subject: [PATCH] Fix location of whitespace cleanup in `deploy.ps1` --- NetboxPS.psd1 | 68 +++++++++++++++++++++++++-------------------------- deploy.ps1 | 7 +++--- 2 files changed, 38 insertions(+), 37 deletions(-) diff --git a/NetboxPS.psd1 b/NetboxPS.psd1 index 4549818..fd772d7 100644 --- a/NetboxPS.psd1 +++ b/NetboxPS.psd1 @@ -1,4 +1,4 @@ -# +# # Module manifest for module 'NetboxPS' # # Generated by: Ben Claussen @@ -69,39 +69,39 @@ CLRVersion = '2.0.50727' NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. -FunctionsToExport = 'Add-NetboxDCIMInterface', 'Add-NetboxDCIMInterfaceConnection', - 'Add-NetboxVirtualMachineInterface', 'Clear-NetboxCredential', - 'Connect-NetboxAPI', 'Get-ModelDefinition', 'Get-NetboxAPIDefinition', - 'Get-NetboxCircuit', 'Get-NetboxCircuitProvider', - 'Get-NetboxCircuitTermination', 'Get-NetboxCircuitType', - 'Get-NetboxContact', 'Get-NetboxContactAssignment', - 'Get-NetboxContactRole', 'Get-NetboxContentType', - 'Get-NetboxCredential', 'Get-NetboxDCIMDevice', - 'Get-NetboxDCIMDeviceRole', 'Get-NetboxDCIMDeviceType', - 'Get-NetboxDCIMInterface', 'Get-NetboxDCIMInterfaceConnection', - 'Get-NetboxDCIMPlatform', 'Get-NetboxDCIMSite', 'Get-NetboxHostname', - 'Get-NetboxHostPort', 'Get-NetboxHostScheme', - 'Get-NetboxInvokeParams', 'Get-NetboxIPAMAddress', - 'Get-NetboxIPAMAggregate', 'Get-NetboxIPAMAvailableIP', - 'Get-NetboxIPAMPrefix', 'Get-NetboxIPAMRole', 'Get-NetboxIPAMVLAN', - 'Get-NetboxTenant', 'Get-NetboxTimeout', 'Get-NetboxVersion', - 'Get-NetboxVirtualizationCluster', - 'Get-NetboxVirtualizationClusterGroup', 'Get-NetboxVirtualMachine', - 'Get-NetboxVirtualMachineInterface', 'New-NetboxCircuit', - 'New-NetboxContact', 'New-NetboxContactAssignment', - 'New-NetboxContactRole', 'New-NetboxDCIMDevice', 'New-NetboxDCIMSite', - 'New-NetboxIPAMAddress', 'New-NetboxIPAMPrefix', 'New-NetboxIPAMVLAN', - 'New-NetboxTenant', 'New-NetboxVirtualMachine', - 'Remove-NetboxDCIMDevice', 'Remove-NetboxDCIMInterface', - 'Remove-NetboxDCIMInterfaceConnection', 'Remove-NetboxDCIMSite', - 'Remove-NetboxIPAMAddress', 'Remove-NetboxVirtualMachine', - 'Set-NetboxCipherSSL', 'Set-NetboxContact', 'Set-NetboxCredential', - 'Set-NetboxDCIMDevice', 'Set-NetboxDCIMInterface', - 'Set-NetboxDCIMInterfaceConnection', 'Set-NetboxHostName', - 'Set-NetboxHostPort', 'Set-NetboxHostScheme', - 'Set-NetboxInvokeParams', 'Set-NetboxIPAMAddress', - 'Set-NetboxIPAMPrefix', 'Set-NetboxTimeout', - 'Set-NetboxUnstrustedSSL', 'Set-NetboxVirtualMachine', +FunctionsToExport = 'Add-NetboxDCIMInterface', 'Add-NetboxDCIMInterfaceConnection', + 'Add-NetboxVirtualMachineInterface', 'Clear-NetboxCredential', + 'Connect-NetboxAPI', 'Get-ModelDefinition', 'Get-NetboxAPIDefinition', + 'Get-NetboxCircuit', 'Get-NetboxCircuitProvider', + 'Get-NetboxCircuitTermination', 'Get-NetboxCircuitType', + 'Get-NetboxContact', 'Get-NetboxContactAssignment', + 'Get-NetboxContactRole', 'Get-NetboxContentType', + 'Get-NetboxCredential', 'Get-NetboxDCIMDevice', + 'Get-NetboxDCIMDeviceRole', 'Get-NetboxDCIMDeviceType', + 'Get-NetboxDCIMInterface', 'Get-NetboxDCIMInterfaceConnection', + 'Get-NetboxDCIMPlatform', 'Get-NetboxDCIMSite', 'Get-NetboxHostname', + 'Get-NetboxHostPort', 'Get-NetboxHostScheme', + 'Get-NetboxInvokeParams', 'Get-NetboxIPAMAddress', + 'Get-NetboxIPAMAggregate', 'Get-NetboxIPAMAvailableIP', + 'Get-NetboxIPAMPrefix', 'Get-NetboxIPAMRole', 'Get-NetboxIPAMVLAN', + 'Get-NetboxTenant', 'Get-NetboxTimeout', 'Get-NetboxVersion', + 'Get-NetboxVirtualizationCluster', + 'Get-NetboxVirtualizationClusterGroup', 'Get-NetboxVirtualMachine', + 'Get-NetboxVirtualMachineInterface', 'New-NetboxCircuit', + 'New-NetboxContact', 'New-NetboxContactAssignment', + 'New-NetboxContactRole', 'New-NetboxDCIMDevice', 'New-NetboxDCIMSite', + 'New-NetboxIPAMAddress', 'New-NetboxIPAMPrefix', 'New-NetboxIPAMVLAN', + 'New-NetboxTenant', 'New-NetboxVirtualMachine', + 'Remove-NetboxDCIMDevice', 'Remove-NetboxDCIMInterface', + 'Remove-NetboxDCIMInterfaceConnection', 'Remove-NetboxDCIMSite', + 'Remove-NetboxIPAMAddress', 'Remove-NetboxVirtualMachine', + 'Set-NetboxCipherSSL', 'Set-NetboxContact', 'Set-NetboxCredential', + 'Set-NetboxDCIMDevice', 'Set-NetboxDCIMInterface', + 'Set-NetboxDCIMInterfaceConnection', 'Set-NetboxHostName', + 'Set-NetboxHostPort', 'Set-NetboxHostScheme', + 'Set-NetboxInvokeParams', 'Set-NetboxIPAMAddress', + 'Set-NetboxIPAMPrefix', 'Set-NetboxTimeout', + 'Set-NetboxUnstrustedSSL', 'Set-NetboxVirtualMachine', 'Set-NetboxVirtualMachineInterface', 'Test-NetboxAPIConnected' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. diff --git a/deploy.ps1 b/deploy.ps1 index aecf108..18f7c0b 100644 --- a/deploy.ps1 +++ b/deploy.ps1 @@ -152,6 +152,10 @@ switch ($PSCmdlet.ParameterSetName) { Write-Host "Updating Module Manifest" Update-ModuleManifest @UpdateModuleManifestSplat +Write-Host " Removing trailing whitespaces from psd1" +Invoke-ScriptAnalyzer -Path $UpdateModuleManifestSplat.Path -IncludeRule 'PSAvoidTrailingWhitespace' -Fix + + if (-not (Test-Path $OutputDirectory)) { try { Write-Warning "Creating output directory [$OutputDirectory]" @@ -165,9 +169,6 @@ if (-not (Test-Path $OutputDirectory)) { Write-Host " Copying psd1" 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" Copy-Item -Path $ConcatenatedFilePath -Destination $PSM1OutputPath -Force