From 5c9933791c900f82562d6076ff3a88eafd2e7bd2 Mon Sep 17 00:00:00 2001 From: David Sparer Date: Wed, 22 Mar 2017 16:39:47 -0600 Subject: [PATCH] do base64 decoding in the script --- Tools/publish_to_github.ps1 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Tools/publish_to_github.ps1 b/Tools/publish_to_github.ps1 index cc54719fc..91e36190a 100644 --- a/Tools/publish_to_github.ps1 +++ b/Tools/publish_to_github.ps1 @@ -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 {