Skip to content

Commit e8a1255

Browse files
committed
add test for powershell:7.1.4 and powershell:7.2.0-preview.10
1 parent 94f4447 commit e8a1255

2 files changed

Lines changed: 34 additions & 1 deletion

File tree

Build/build-tasks.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ task PsDesktopTest {
170170
}
171171

172172
task PsCoreTest {
173+
# show-powershell-images.ps1
173174
$images = $(
174175
"mcr.microsoft.com/powershell:6.1.0-ubuntu-18.04"
175176
, "mcr.microsoft.com/powershell:6.1.1-alpine-3.8"
@@ -188,7 +189,8 @@ task PsCoreTest {
188189
, "mcr.microsoft.com/powershell:7.1.1-ubuntu-20.04"
189190
, "mcr.microsoft.com/powershell:7.1.2-ubuntu-20.04"
190191
, "mcr.microsoft.com/powershell:7.1.3-ubuntu-20.04"
191-
, "mcr.microsoft.com/powershell:7.2.0-preview.7-ubuntu-20.04")
192+
, "mcr.microsoft.com/powershell:7.1.4-ubuntu-20.04"
193+
, "mcr.microsoft.com/powershell:7.2.0-preview.10-ubuntu-20.04")
192194

193195
$builds = @()
194196
foreach ($image in $images) {

Build/show-powershell-images.ps1

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
$ErrorActionPreference = "Stop"
2+
3+
function Get-ShortVersion {
4+
[CmdletBinding()]
5+
param (
6+
[Parameter(ValueFromPipeline)]
7+
[string]
8+
$FullVersion
9+
)
10+
11+
process {
12+
$parts = $FullVersion -split "-"
13+
$result = $parts[0]
14+
15+
if ($parts[1] -like "preview*") {
16+
$result += "-" + $parts[1]
17+
}
18+
19+
return $result
20+
}
21+
}
22+
23+
(Invoke-RestMethod -Uri "https://mcr.microsoft.com/v2/powershell/tags/list").tags `
24+
| Where-Object {$_ -Like "[0-9]*"} `
25+
| Get-ShortVersion `
26+
| Sort-Object -Unique
27+
28+
# (Invoke-RestMethod -Uri "https://mcr.microsoft.com/v2/powershell/tags/list").tags `
29+
# | Where-Object {$_ -Like "7.2.0*"} `
30+
# | Where-Object {($_ -Like "*ubuntu*") -or ($_ -Like "*alpine*")} `
31+
# | Sort-Object

0 commit comments

Comments
 (0)