Skip to content

Commit

Permalink
add test for powershell:7.1.4 and powershell:7.2.0-preview.10
Browse files Browse the repository at this point in the history
  • Loading branch information
max-ieremenko committed Oct 3, 2021
1 parent 94f4447 commit e8a1255
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Build/build-tasks.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ task PsDesktopTest {
}

task PsCoreTest {
# show-powershell-images.ps1
$images = $(
"mcr.microsoft.com/powershell:6.1.0-ubuntu-18.04"
, "mcr.microsoft.com/powershell:6.1.1-alpine-3.8"
Expand All @@ -188,7 +189,8 @@ task PsCoreTest {
, "mcr.microsoft.com/powershell:7.1.1-ubuntu-20.04"
, "mcr.microsoft.com/powershell:7.1.2-ubuntu-20.04"
, "mcr.microsoft.com/powershell:7.1.3-ubuntu-20.04"
, "mcr.microsoft.com/powershell:7.2.0-preview.7-ubuntu-20.04")
, "mcr.microsoft.com/powershell:7.1.4-ubuntu-20.04"
, "mcr.microsoft.com/powershell:7.2.0-preview.10-ubuntu-20.04")

$builds = @()
foreach ($image in $images) {
Expand Down
31 changes: 31 additions & 0 deletions Build/show-powershell-images.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
$ErrorActionPreference = "Stop"

function Get-ShortVersion {
[CmdletBinding()]
param (
[Parameter(ValueFromPipeline)]
[string]
$FullVersion
)

process {
$parts = $FullVersion -split "-"
$result = $parts[0]

if ($parts[1] -like "preview*") {
$result += "-" + $parts[1]
}

return $result
}
}

(Invoke-RestMethod -Uri "https://mcr.microsoft.com/v2/powershell/tags/list").tags `
| Where-Object {$_ -Like "[0-9]*"} `
| Get-ShortVersion `
| Sort-Object -Unique

# (Invoke-RestMethod -Uri "https://mcr.microsoft.com/v2/powershell/tags/list").tags `
# | Where-Object {$_ -Like "7.2.0*"} `
# | Where-Object {($_ -Like "*ubuntu*") -or ($_ -Like "*alpine*")} `
# | Sort-Object

0 comments on commit e8a1255

Please sign in to comment.