Skip to content

Commit

Permalink
Merge pull request #73 from theohbrothers/fix/release-fix-default-var…
Browse files Browse the repository at this point in the history
…iable-values-for-when-env-release_draft-and-env-release_prerelease-are-null-or-undefined

Fix (release): Fix default variable values for when `$env:RELEASE_DRAFT` and `$env:RELEASE_PRERELEASE` are null or undefined
  • Loading branch information
joeltimothyoh authored May 20, 2024
2 parents 4d65f3d + ef8b53a commit 18969b4
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 18969b4

Please sign in to comment.