Skip to content

Commit 791356d

Browse files
🩹 [Patch]: Refactor author and company name assignment logic in module manifest
1 parent a63d515 commit 791356d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎scripts/helpers/Build/Build-PSModuleManifest.ps1‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@
5858
$manifest.ModuleVersion = '999.0.0'
5959
Write-Host "[ModuleVersion] - [$($manifest.ModuleVersion)]"
6060

61-
$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
6262
Write-Host "[Author] - [$($manifest.Author)]"
6363

64-
$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
6565
Write-Host "[CompanyName] - [$($manifest.CompanyName)]"
6666

6767
$year = Get-Date -Format 'yyyy'
@@ -71,7 +71,7 @@
7171
Write-Host "[Copyright] - [$($manifest.Copyright)]"
7272

7373
$repoDescription = gh repo view --json description | ConvertFrom-Json | Select-Object -ExpandProperty description
74-
$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
7575
Write-Host "[Description] - [$($manifest.Description)]"
7676

7777
$manifest.PowerShellHostName = $manifest.Keys -contains 'PowerShellHostName' ? -not [string]::IsNullOrEmpty($manifest.PowerShellHostName) ? $manifest.PowerShellHostName : $null : $null

0 commit comments

Comments
 (0)