Skip to content

Commit

Permalink
Fix (release): Fix default variable values for when `$env:RELEASE_DRA…
Browse files Browse the repository at this point in the history
…FT` and `$env:RELEASE_PRERELEASE` are null or undefined
  • Loading branch information
joeltimothyoh committed May 20, 2024
1 parent 4d65f3d commit ef8b53a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scripts/ci/Invoke-Release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ try {
"Default release notes not found at the path '$private:defaultReleaseNotesPath'. No release notes will be included with the release." | Write-Verbose
}
}
if ($env:RELEASE_DRAFT) { $private:createReleaseArgs['Draft'] = [System.Convert]::ToBoolean($env:RELEASE_DRAFT) } else { $false }
if ($env:RELEASE_PRERELEASE) { $private:createReleaseArgs['Prerelease'] = [System.Convert]::ToBoolean($env:RELEASE_PRERELEASE) } else { $false }
$private:createReleaseArgs['Draft'] = if ($env:RELEASE_DRAFT) { [System.Convert]::ToBoolean($env:RELEASE_DRAFT) } else { $false }
$private:createReleaseArgs['Prerelease'] = if ($env:RELEASE_PRERELEASE) { [System.Convert]::ToBoolean($env:RELEASE_PRERELEASE) } else { $false }
$response = Create-GitHubRelease @private:createReleaseArgs
$responseContent = $response.Content | ConvertFrom-Json

Expand Down

0 comments on commit ef8b53a

Please sign in to comment.