do base64 decoding in the script

This commit is contained in:
David Sparer
2017-03-22 16:39:47 -06:00
parent 039d4d11aa
commit 5c9933791c

View File

@@ -54,11 +54,18 @@ param (
[string]
[Parameter(Mandatory=$true)]
# The OAuth2 token to use for authentication.
$AuthToken
$AuthToken,
[switch]
# Enable this switch to treat $Description as a Base64 encoded string. It will be decoded before being used elsewhere in the script.
$DescriptionIsBase64Encoded
)
$githubUrl = 'https://api.github.com'
if ($DescriptionIsBase64Encoded) {
$Description = ([System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($Description)))
}
function Publish-Release {