|
11 | 11 | #>
|
12 | 12 | [OutputType([void])]
|
13 | 13 | [CmdletBinding()]
|
14 |
| - #Requires -Modules Utilities, PowerShellGet, Microsoft.PowerShell.PSResourceGet, GitHub, PSSemVer |
15 | 14 | [Diagnostics.CodeAnalysis.SuppressMessageAttribute(
|
16 | 15 | 'PSReviewUnusedParameter', '', Scope = 'Function',
|
17 | 16 | Justification = 'LogGroup - Scoping affects the variables line of sight.'
|
|
146 | 145 | $latestRelease = $releases | Where-Object { $_.isLatest -eq $true }
|
147 | 146 | $latestRelease | Format-List | Out-String
|
148 | 147 | $ghReleaseVersionString = $latestRelease.tagName
|
149 |
| - if ($ghReleaseVersionString | IsNotNullOrEmpty) { |
| 148 | + if (-not [string]::IsNullOrEmpty($ghReleaseVersionString)) { |
150 | 149 | $ghReleaseVersion = New-PSSemVer -Version $ghReleaseVersionString
|
151 | 150 | } else {
|
152 | 151 | Write-Warning 'Could not find the latest release version. Using ''0.0.0'' as the version.'
|
|
198 | 197 | try {
|
199 | 198 | $manifestVersion = New-PSSemVer -Version (Test-ModuleManifest $manifestFilePath -Verbose:$false).Version
|
200 | 199 | } catch {
|
201 |
| - if ($manifestVersion | IsNullOrEmpty) { |
| 200 | + if ([string]::IsNullOrEmpty($manifestVersion)) { |
202 | 201 | Write-Warning 'Could not find the module version in the manifest. Using ''0.0.0'' as the version.'
|
203 | 202 | $manifestVersion = New-PSSemVer -Version '0.0.0'
|
204 | 203 | }
|
|
249 | 248 | $newVersion.Prerelease = $prereleaseName
|
250 | 249 | Write-Output "Partial new version: [$newVersion]"
|
251 | 250 |
|
252 |
| - if ($datePrereleaseFormat | IsNotNullOrEmpty) { |
| 251 | + if (-not [string]::IsNullOrEmpty($datePrereleaseFormat)) { |
253 | 252 | Write-Output "Using date-based prerelease: [$datePrereleaseFormat]."
|
254 | 253 | $newVersion.Prerelease += "$(Get-Date -Format $datePrereleaseFormat)"
|
255 | 254 | Write-Output "Partial new version: [$newVersion]"
|
|
0 commit comments