|
11 | 11 | Build-PSModuleManifest -SourceFolderPath 'C:\MyModule\src\MyModule' -OutputFolderPath 'C:\MyModule\build\MyModule'
|
12 | 12 | #>
|
13 | 13 | [CmdletBinding()]
|
14 |
| - #Requires -Modules @{ ModuleName = 'GitHub'; ModuleVersion = '0.13.2' } |
15 |
| - #Requires -Modules @{ ModuleName = 'Utilities'; ModuleVersion = '0.3.0' } |
16 | 14 | [Diagnostics.CodeAnalysis.SuppressMessageAttribute(
|
17 | 15 | 'PSAvoidLongLines', '', Scope = 'Function',
|
18 | 16 | Justification = 'Easier to read the multi ternery operators in a single line.'
|
|
60 | 58 | $manifest.ModuleVersion = '999.0.0'
|
61 | 59 | Write-Host "[ModuleVersion] - [$($manifest.ModuleVersion)]"
|
62 | 60 |
|
63 |
| - $manifest.Author = $manifest.Keys -contains 'Author' ? ($manifest.Author | IsNotNullOrEmpty) ? $manifest.Author : $env:GITHUB_REPOSITORY_OWNER : $env:GITHUB_REPOSITORY_OWNER |
| 61 | + $manifest.Author = $manifest.Keys -contains 'Author' ? (-not [string]::IsNullOrEmpty($manifest.Author)) ? $manifest.Author : $env:GITHUB_REPOSITORY_OWNER : $env:GITHUB_REPOSITORY_OWNER |
64 | 62 | Write-Host "[Author] - [$($manifest.Author)]"
|
65 | 63 |
|
66 |
| - $manifest.CompanyName = $manifest.Keys -contains 'CompanyName' ? ($manifest.CompanyName | IsNotNullOrEmpty) ? $manifest.CompanyName : $env:GITHUB_REPOSITORY_OWNER : $env:GITHUB_REPOSITORY_OWNER |
| 64 | + $manifest.CompanyName = $manifest.Keys -contains 'CompanyName' ? (-not [string]::IsNullOrEmpty($manifest.CompanyName)) ? $manifest.CompanyName : $env:GITHUB_REPOSITORY_OWNER : $env:GITHUB_REPOSITORY_OWNER |
67 | 65 | Write-Host "[CompanyName] - [$($manifest.CompanyName)]"
|
68 | 66 |
|
69 | 67 | $year = Get-Date -Format 'yyyy'
|
|
73 | 71 | Write-Host "[Copyright] - [$($manifest.Copyright)]"
|
74 | 72 |
|
75 | 73 | $repoDescription = gh repo view --json description | ConvertFrom-Json | Select-Object -ExpandProperty description
|
76 |
| - $manifest.Description = $manifest.Keys -contains 'Description' ? ($manifest.Description | IsNotNullOrEmpty) ? $manifest.Description : $repoDescription : $repoDescription |
| 74 | + $manifest.Description = $manifest.Keys -contains 'Description' ? (-not [string]::IsNullOrEmpty($manifest.Description)) ? $manifest.Description : $repoDescription : $repoDescription |
77 | 75 | Write-Host "[Description] - [$($manifest.Description)]"
|
78 | 76 |
|
79 | 77 | $manifest.PowerShellHostName = $manifest.Keys -contains 'PowerShellHostName' ? -not [string]::IsNullOrEmpty($manifest.PowerShellHostName) ? $manifest.PowerShellHostName : $null : $null
|
|
0 commit comments