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