Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Evergreen/Shared/Get-AmazonCorretto.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,22 @@ function Get-AmazonCorretto {

# Construct the output; Return the custom object to the pipeline
if ($null -ne $Response) {

$ImageType = if ($Url -match "jre") {
"JRE"
}
elseif ($Url -match "jdk") {
"JDK"
}
else {
"Unknown"
}

$PSObject = [PSCustomObject] @{
Version = [RegEx]::Match($Response.ResponseUri.LocalPath, $res.Get.Download.MatchVersion).Captures.Groups[1].Value
Md5 = (Invoke-EvergreenWebRequest -Uri $ChecksumUrl -Raw -ReturnObject "Content")
Architecture = Get-Architecture -String $Response.ResponseUri.AbsoluteUri
ImageType = $ImageType
Type = Get-FileType -File $Response.ResponseUri.AbsoluteUri
URI = $Response.ResponseUri.AbsoluteUri
}
Expand Down