Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions scripts/helpers/Build/Build-PSModuleManifest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ function Build-PSModuleManifest {
Write-Verbose "[CompanyName] - [$($manifest.CompanyName)]"

$year = Get-Date -Format 'yyyy'
$copyRightOwner = $manifest.CompanyName -eq $manifest.Author ? $manifest.Author : "$($manifest.Author) | $($manifest.CompanyName)"
$copyRight = "(c) $year $copyRightOwner. All rights reserved."
$manifest.CopyRight = $manifest.Keys -contains 'CopyRight' ? -not [string]::IsNullOrEmpty($manifest.CopyRight) ? $manifest.CopyRight : $copyRight : $copyRight
Write-Verbose "[CopyRight] - [$($manifest.CopyRight)]"
$copyrightOwner = $manifest.CompanyName -eq $manifest.Author ? $manifest.Author : "$($manifest.Author) | $($manifest.CompanyName)"
$copyright = "(c) $year $copyrightOwner. All rights reserved."
$manifest.Copyright = $manifest.Keys -contains 'Copyright' ? -not [string]::IsNullOrEmpty($manifest.Copyright) ? $manifest.Copyright : $copyright : $copyright
Write-Verbose "[Copyright] - [$($manifest.Copyright)]"

$repoDescription = gh repo view --json description | ConvertFrom-Json | Select-Object -ExpandProperty description
$manifest.Description = $manifest.Keys -contains 'Description' ? ($manifest.Description | IsNotNullOrEmpty) ? $manifest.Description : $repoDescription : $repoDescription
Expand Down
2 changes: 2 additions & 0 deletions tests/srcWithManifest/manifest.psd1
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@{
ModuleVersion = '0.0.0'
RootModule = 'PSModuleTest.psm1'
Copyright = 'Test'
Description = 'This is a test module.'
}