v-nibyko/get-go-versions
Nikita Bykov 3 years ago
parent 9f535cd83f
commit bb9fd35708

@ -35,15 +35,13 @@ Import-Module $PSScriptRoot/helpers.psm1 -DisableNameChecking
# Create JSON body # Create JSON body
if ([string]::IsNullOrWhiteSpace($Text)) { if ([string]::IsNullOrWhiteSpace($Text)) {
if ($toolName -eq "Xamarin") { if ($toolName -eq "Xamarin") {
$text = "The following versions of '$toolName' are available, consider adding them to toolset: $toolVersion" $Text = "The following versions of '$toolName' are available, consider adding them to toolset: $toolVersion"
} else { } else {
$text = "The following versions of '$toolName' are available to upload: $toolVersion" $Text = "The following versions of '$toolName' are available to upload: $toolVersion"
} }
if (-not ([string]::IsNullOrWhiteSpace($PipelineUrl))) { if (-not ([string]::IsNullOrWhiteSpace($PipelineUrl))) {
$text += "\nLink to the pipeline: $pipelineUrl" $Text += "\nLink to the pipeline: $pipelineUrl"
} }
} else {
$text = $Text
} }
$jsonBodyMessage = @" $jsonBodyMessage = @"
{ {
@ -52,7 +50,7 @@ $jsonBodyMessage = @"
"type": "section", "type": "section",
"text": { "text": {
"type": "mrkdwn", "type": "mrkdwn",
"text": "$text" "text": "$Text"
}, },
"accessory": { "accessory": {
"type": "image", "type": "image",

Loading…
Cancel
Save