Skip to content

Commit a1256a5

Browse files
scbeddazure-sdk
authored andcommitted
allow the script to require pshell6+
1 parent 1fbe78f commit a1256a5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

eng/common/testproxy/scripts/tag-merge/merge-proxy-tags.ps1

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#Requires -Version 6.0
2+
#Requires -PSEdition Core
3+
14
<#
25
.SYNOPSIS
36
Merge multiple asset tagss worth of content into a single asset tag.
@@ -181,7 +184,13 @@ function Start-Message($AssetsJson, $TargetTags, $AssetsRepoLocation, $MountDire
181184
function Finish-Message($AssetsJson, $TargetTags, $AssetsRepoLocation, $MountDirectory) {
182185
$len = $TargetTags.Length
183186

184-
Write-Host "`nSuccessfully combined $len tags. Invoke `"test-proxy push " -NoNewLine
187+
if ($TargetTags.GetType().Name -eq "String") {
188+
$len = 1
189+
}
190+
191+
$suffix = if ($len -gt 1) { "s" } else { "" }
192+
193+
Write-Host "`nSuccessfully combined $len tag$suffix. Invoke `"test-proxy push " -NoNewLine
185194
Write-Host $AssetsJson -ForegroundColor Green -NoNewLine
186195
Write-Host "`" to push the results as a new tag."
187196
}

0 commit comments

Comments
 (0)