Skip to content
Merged
6 changes: 3 additions & 3 deletions scripts/helpers/Build/Build-PSModuleManifest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
$manifest.ModuleVersion = '999.0.0'
Write-Host "[ModuleVersion] - [$($manifest.ModuleVersion)]"

$manifest.Author = $manifest.Keys -contains 'Author' ? ($manifest.Author | IsNotNullOrEmpty) ? $manifest.Author : $env:GITHUB_REPOSITORY_OWNER : $env:GITHUB_REPOSITORY_OWNER
$manifest.Author = $manifest.Keys -contains 'Author' ? -not [string]::IsNullOrEmpty($manifest.Author) ? $manifest.Author : $env:GITHUB_REPOSITORY_OWNER : $env:GITHUB_REPOSITORY_OWNER
Write-Host "[Author] - [$($manifest.Author)]"

$manifest.CompanyName = $manifest.Keys -contains 'CompanyName' ? ($manifest.CompanyName | IsNotNullOrEmpty) ? $manifest.CompanyName : $env:GITHUB_REPOSITORY_OWNER : $env:GITHUB_REPOSITORY_OWNER
$manifest.CompanyName = $manifest.Keys -contains 'CompanyName' ? -not [string]::IsNullOrEmpty($manifest.CompanyName) ? $manifest.CompanyName : $env:GITHUB_REPOSITORY_OWNER : $env:GITHUB_REPOSITORY_OWNER
Write-Host "[CompanyName] - [$($manifest.CompanyName)]"

$year = Get-Date -Format 'yyyy'
Expand All @@ -73,7 +73,7 @@
Write-Host "[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
$manifest.Description = $manifest.Keys -contains 'Description' ? -not [string]::IsNullOrEmpty($manifest.Description) ? $manifest.Description : $repoDescription : $repoDescription
Write-Host "[Description] - [$($manifest.Description)]"

$manifest.PowerShellHostName = $manifest.Keys -contains 'PowerShellHostName' ? -not [string]::IsNullOrEmpty($manifest.PowerShellHostName) ? $manifest.PowerShellHostName : $null : $null
Expand Down
3 changes: 2 additions & 1 deletion scripts/helpers/Build/Get-PSModuleAliasesToExport.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
$manifest = Get-ModuleManifest -Path $manifestFilePath -Verbose:$false

Write-Host "[$manifestPropertyName]"
$aliasesToExport = (($manifest.AliasesToExport).count -eq 0) -or ($manifest.AliasesToExport | IsNullOrEmpty) ? '*' : $manifest.AliasesToExport
$aliasesToExport = (($manifest.AliasesToExport).count -eq 0) -or [string]::IsNullOrEmpty($manifest.AliasesToExport) ?
'*' : $manifest.AliasesToExport
$aliasesToExport | ForEach-Object {
Write-Host "[$manifestPropertyName] - [$_]"
}
Expand Down
3 changes: 2 additions & 1 deletion scripts/helpers/Build/Get-PSModuleCmdletsToExport.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
$manifest = Get-ModuleManifest -Path $manifestFilePath -Verbose:$false

Write-Host "[$manifestPropertyName]"
$cmdletsToExport = (($manifest.CmdletsToExport).count -eq 0) -or ($manifest.CmdletsToExport | IsNullOrEmpty) ? '' : $manifest.CmdletsToExport
$cmdletsToExport = (($manifest.CmdletsToExport).count -eq 0) -or [string]::IsNullOrEmpty($manifest.CmdletsToExport) ?
'' : $manifest.CmdletsToExport
$cmdletsToExport | ForEach-Object {
Write-Host "[$manifestPropertyName] - [$_]"
}
Expand Down
4 changes: 1 addition & 3 deletions scripts/main.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
[CmdletBinding()]
param()

#Requires -Modules Utilities

$path = (Join-Path -Path $PSScriptRoot -ChildPath 'helpers') | Get-Item | Resolve-Path -Relative
LogGroup "Loading helper scripts from [$path]" {
Get-ChildItem -Path $path -Filter '*.ps1' -Recurse | Resolve-Path -Relative | ForEach-Object {
Expand All @@ -16,7 +14,7 @@ LogGroup "Loading helper scripts from [$path]" {
}

LogGroup 'Loading inputs' {
$moduleName = ($env:GITHUB_ACTION_INPUT_Name | IsNullOrEmpty) ? $env:GITHUB_REPOSITORY_NAME : $env:GITHUB_ACTION_INPUT_Name
$moduleName = [string]::IsNullOrEmpty($env:GITHUB_ACTION_INPUT_Name) ? $env:GITHUB_REPOSITORY_NAME : $env:GITHUB_ACTION_INPUT_Name
Write-Host "Module name: [$moduleName]"

$moduleSourceFolderPath = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath $env:GITHUB_ACTION_INPUT_Path/$moduleName
Expand Down