From 3f20d09c2f90ca2d112966bb6a5d367f126113ca Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Sun, 7 Jul 2024 20:45:53 +1000 Subject: [PATCH 1/8] Update Get-AkeoRufusAlt.ps1 Fix version string selection --- Evergreen/Apps/Get-AkeoRufusAlt.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Evergreen/Apps/Get-AkeoRufusAlt.ps1 b/Evergreen/Apps/Get-AkeoRufusAlt.ps1 index ef39b4ef..91543239 100644 --- a/Evergreen/Apps/Get-AkeoRufusAlt.ps1 +++ b/Evergreen/Apps/Get-AkeoRufusAlt.ps1 @@ -18,7 +18,7 @@ function Get-AkeoRufusAlt { $UpdateFeedLines = $UpdateFeed -split "`n" # Match the version number - $Version = (($UpdateFeedLines | Select-String -Pattern "version").Line -split "=")[-1].Trim() + $Version = (($UpdateFeedLines | Select-String -Pattern "^version" -CaseSensitive).Line -split "=")[-1].Trim() # For each architecture, match the download URL and return to the pipeline foreach ($Architecture in $res.Get.Update.Architectures.GetEnumerator()) { From cb1f231fa97e55f1c65d9be6b391e21722824a96 Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Sun, 7 Jul 2024 21:35:53 +1000 Subject: [PATCH 2/8] Update Amazon Corretto #771 --- Evergreen/Apps/Get-AmazonCorretto.ps1 | 39 ------------------ Evergreen/Apps/Get-AmazonCorretto11.ps1 | 19 +++++++++ Evergreen/Apps/Get-AmazonCorretto15.ps1 | 19 +++++++++ Evergreen/Apps/Get-AmazonCorretto16.ps1 | 19 +++++++++ Evergreen/Apps/Get-AmazonCorretto17.ps1 | 19 +++++++++ Evergreen/Apps/Get-AmazonCorretto20.ps1 | 19 +++++++++ Evergreen/Apps/Get-AmazonCorretto21.ps1 | 19 +++++++++ Evergreen/Apps/Get-AmazonCorretto22.ps1 | 19 +++++++++ Evergreen/Apps/Get-AmazonCorretto8.ps1 | 19 +++++++++ Evergreen/Manifests/AmazonCorretto.json | 49 ----------------------- Evergreen/Manifests/AmazonCorretto11.json | 30 ++++++++++++++ Evergreen/Manifests/AmazonCorretto15.json | 28 +++++++++++++ Evergreen/Manifests/AmazonCorretto16.json | 28 +++++++++++++ Evergreen/Manifests/AmazonCorretto17.json | 28 +++++++++++++ Evergreen/Manifests/AmazonCorretto20.json | 28 +++++++++++++ Evergreen/Manifests/AmazonCorretto21.json | 28 +++++++++++++ Evergreen/Manifests/AmazonCorretto22.json | 28 +++++++++++++ Evergreen/Manifests/AmazonCorretto8.json | 30 ++++++++++++++ Evergreen/Shared/Get-AmazonCorretto.ps1 | 37 +++++++++++++++++ 19 files changed, 417 insertions(+), 88 deletions(-) delete mode 100644 Evergreen/Apps/Get-AmazonCorretto.ps1 create mode 100644 Evergreen/Apps/Get-AmazonCorretto11.ps1 create mode 100644 Evergreen/Apps/Get-AmazonCorretto15.ps1 create mode 100644 Evergreen/Apps/Get-AmazonCorretto16.ps1 create mode 100644 Evergreen/Apps/Get-AmazonCorretto17.ps1 create mode 100644 Evergreen/Apps/Get-AmazonCorretto20.ps1 create mode 100644 Evergreen/Apps/Get-AmazonCorretto21.ps1 create mode 100644 Evergreen/Apps/Get-AmazonCorretto22.ps1 create mode 100644 Evergreen/Apps/Get-AmazonCorretto8.ps1 delete mode 100644 Evergreen/Manifests/AmazonCorretto.json create mode 100644 Evergreen/Manifests/AmazonCorretto11.json create mode 100644 Evergreen/Manifests/AmazonCorretto15.json create mode 100644 Evergreen/Manifests/AmazonCorretto16.json create mode 100644 Evergreen/Manifests/AmazonCorretto17.json create mode 100644 Evergreen/Manifests/AmazonCorretto20.json create mode 100644 Evergreen/Manifests/AmazonCorretto21.json create mode 100644 Evergreen/Manifests/AmazonCorretto22.json create mode 100644 Evergreen/Manifests/AmazonCorretto8.json create mode 100644 Evergreen/Shared/Get-AmazonCorretto.ps1 diff --git a/Evergreen/Apps/Get-AmazonCorretto.ps1 b/Evergreen/Apps/Get-AmazonCorretto.ps1 deleted file mode 100644 index 50b0237d..00000000 --- a/Evergreen/Apps/Get-AmazonCorretto.ps1 +++ /dev/null @@ -1,39 +0,0 @@ -function Get-AmazonCorretto { - <# - .SYNOPSIS - Get the current versions and download URLs for Amazon Corretto 8, 11, 15 and 16. - - .NOTES - Author: Andrew Cooper - Twitter: @adotcoop - #> - [OutputType([System.Management.Automation.PSObject])] - [CmdletBinding(SupportsShouldProcess = $false)] - param ( - [Parameter(Mandatory = $false, Position = 0)] - [ValidateNotNull()] - [System.Management.Automation.PSObject] - $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) - ) - - # Get the latest download - foreach ($JDKversion in $res.Get.Download.JDK.GetEnumerator()) { - Write-Verbose -Message "$($MyInvocation.MyCommand): Looking for JDK version $($JDKversion.Name)." - - foreach ($JDKType in $res.Get.Download.JDK.($JDKversion.Name).GetEnumerator()) { - $Response = Resolve-SystemNetWebRequest -Uri $JDKType.Value - - # Construct the output; Return the custom object to the pipeline - if ($null -ne $Response) { - $PSObject = [PSCustomObject] @{ - Version = [RegEx]::Match($Response.ResponseUri.LocalPath, $res.Get.Download.MatchVersion).Captures.Groups[1].Value - JDK = $JDKversion.Name - Architecture = Get-Architecture -String $JDKType.Value - Type = [System.IO.Path]::GetExtension($JDKType.Value).Split(".")[-1] - URI = $Response.ResponseUri.AbsoluteUri - } - Write-Output -InputObject $PSObject - } - } - } -} diff --git a/Evergreen/Apps/Get-AmazonCorretto11.ps1 b/Evergreen/Apps/Get-AmazonCorretto11.ps1 new file mode 100644 index 00000000..d4ce9592 --- /dev/null +++ b/Evergreen/Apps/Get-AmazonCorretto11.ps1 @@ -0,0 +1,19 @@ +function Get-AmazonCorretto11 { + <# + .NOTES + Author: Aaron Parker + Twitter: @stealthpuppy + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $false)] + param ( + [Parameter(Mandatory = $false, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Get the latest download + $Object = Get-AmazonCorretto -res $res + Write-Output -InputObject $Object +} diff --git a/Evergreen/Apps/Get-AmazonCorretto15.ps1 b/Evergreen/Apps/Get-AmazonCorretto15.ps1 new file mode 100644 index 00000000..5c359092 --- /dev/null +++ b/Evergreen/Apps/Get-AmazonCorretto15.ps1 @@ -0,0 +1,19 @@ +function Get-AmazonCorretto15 { + <# + .NOTES + Author: Aaron Parker + Twitter: @stealthpuppy + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $false)] + param ( + [Parameter(Mandatory = $false, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Get the latest download + $Object = Get-AmazonCorretto -res $res + Write-Output -InputObject $Object +} diff --git a/Evergreen/Apps/Get-AmazonCorretto16.ps1 b/Evergreen/Apps/Get-AmazonCorretto16.ps1 new file mode 100644 index 00000000..1be98db5 --- /dev/null +++ b/Evergreen/Apps/Get-AmazonCorretto16.ps1 @@ -0,0 +1,19 @@ +function Get-AmazonCorretto16 { + <# + .NOTES + Author: Aaron Parker + Twitter: @stealthpuppy + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $false)] + param ( + [Parameter(Mandatory = $false, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Get the latest download + $Object = Get-AmazonCorretto -res $res + Write-Output -InputObject $Object +} diff --git a/Evergreen/Apps/Get-AmazonCorretto17.ps1 b/Evergreen/Apps/Get-AmazonCorretto17.ps1 new file mode 100644 index 00000000..f0346c89 --- /dev/null +++ b/Evergreen/Apps/Get-AmazonCorretto17.ps1 @@ -0,0 +1,19 @@ +function Get-AmazonCorretto17 { + <# + .NOTES + Author: Aaron Parker + Twitter: @stealthpuppy + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $false)] + param ( + [Parameter(Mandatory = $false, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Get the latest download + $Object = Get-AmazonCorretto -res $res + Write-Output -InputObject $Object +} diff --git a/Evergreen/Apps/Get-AmazonCorretto20.ps1 b/Evergreen/Apps/Get-AmazonCorretto20.ps1 new file mode 100644 index 00000000..b2bf8b73 --- /dev/null +++ b/Evergreen/Apps/Get-AmazonCorretto20.ps1 @@ -0,0 +1,19 @@ +function Get-AmazonCorretto20 { + <# + .NOTES + Author: Aaron Parker + Twitter: @stealthpuppy + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $false)] + param ( + [Parameter(Mandatory = $false, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Get the latest download + $Object = Get-AmazonCorretto -res $res + Write-Output -InputObject $Object +} diff --git a/Evergreen/Apps/Get-AmazonCorretto21.ps1 b/Evergreen/Apps/Get-AmazonCorretto21.ps1 new file mode 100644 index 00000000..bdb80135 --- /dev/null +++ b/Evergreen/Apps/Get-AmazonCorretto21.ps1 @@ -0,0 +1,19 @@ +function Get-AmazonCorretto21 { + <# + .NOTES + Author: Aaron Parker + Twitter: @stealthpuppy + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $false)] + param ( + [Parameter(Mandatory = $false, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Get the latest download + $Object = Get-AmazonCorretto -res $res + Write-Output -InputObject $Object +} diff --git a/Evergreen/Apps/Get-AmazonCorretto22.ps1 b/Evergreen/Apps/Get-AmazonCorretto22.ps1 new file mode 100644 index 00000000..7993e9f9 --- /dev/null +++ b/Evergreen/Apps/Get-AmazonCorretto22.ps1 @@ -0,0 +1,19 @@ +function Get-AmazonCorretto22 { + <# + .NOTES + Author: Aaron Parker + Twitter: @stealthpuppy + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $false)] + param ( + [Parameter(Mandatory = $false, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Get the latest download + $Object = Get-AmazonCorretto -res $res + Write-Output -InputObject $Object +} diff --git a/Evergreen/Apps/Get-AmazonCorretto8.ps1 b/Evergreen/Apps/Get-AmazonCorretto8.ps1 new file mode 100644 index 00000000..74b46452 --- /dev/null +++ b/Evergreen/Apps/Get-AmazonCorretto8.ps1 @@ -0,0 +1,19 @@ +function Get-AmazonCorretto8 { + <# + .NOTES + Author: Aaron Parker + Twitter: @stealthpuppy + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $false)] + param ( + [Parameter(Mandatory = $false, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Get the latest download + $Object = Get-AmazonCorretto -res $res + Write-Output -InputObject $Object +} diff --git a/Evergreen/Manifests/AmazonCorretto.json b/Evergreen/Manifests/AmazonCorretto.json deleted file mode 100644 index 7bea74e9..00000000 --- a/Evergreen/Manifests/AmazonCorretto.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "Name": "Amazon Corretto", - "Source": "https://aws.amazon.com/corretto/", - "Get": { - "Update": { - "Uri": "" - }, - "Download": { - "JDK": { - "8": { - "x64msi" :"https://corretto.aws/downloads/latest/amazon-corretto-8-x64-windows-jdk.msi", - "x64jre" :"https://corretto.aws/downloads/latest/amazon-corretto-8-x64-windows-jre.zip", - "x86msi" :"https://corretto.aws/downloads/latest/amazon-corretto-8-x86-windows-jdk.msi", - "x86jre" :"https://corretto.aws/downloads/latest/amazon-corretto-8-x86-windows-jre.zip" - }, - "11": { - "x64msi" :"https://corretto.aws/downloads/latest/amazon-corretto-11-x64-windows-jdk.msi", - "x86msi" :"https://corretto.aws/downloads/latest/amazon-corretto-11-x86-windows-jdk.msi" - }, - "15": { - "x64msi" :"https://corretto.aws/downloads/latest/amazon-corretto-15-x64-windows-jdk.msi" - - }, - "16": { - "x64msi" :"https://corretto.aws/downloads/latest/amazon-corretto-16-x64-windows-jdk.msi" - }, - "17": { - "x64msi" :"https://corretto.aws/downloads/latest/amazon-corretto-17-x64-windows-jdk.msi" - }, - "20": { - "x64msi" :"https://corretto.aws/downloads/latest/amazon-corretto-20-x64-windows-jdk.msi" - } - }, - "Property": "ResponseUri.Headers.Location", - "MatchVersion": "(\\d+(\\.\\d+){1,4})" - } - }, - "Install": { - "Setup": "amazon-corretto-*.msi", - "Physical": { - "Arguments": "/install /passive /norestart", - "PostInstall": [] - }, - "Virtual": { - "Arguments": "/install /passive /norestart", - "PostInstall": [] - } - } -} diff --git a/Evergreen/Manifests/AmazonCorretto11.json b/Evergreen/Manifests/AmazonCorretto11.json new file mode 100644 index 00000000..2f2c9ae2 --- /dev/null +++ b/Evergreen/Manifests/AmazonCorretto11.json @@ -0,0 +1,30 @@ +{ + "Name": "Amazon Corretto 11", + "Source": "https://aws.amazon.com/corretto/", + "Get": { + "Update": { + "Uri": "" + }, + "Download": { + "Uri": [ + "https://corretto.aws/downloads/latest/amazon-corretto-11-x64-windows-jdk.msi", + "https://corretto.aws/downloads/latest/amazon-corretto-11-x86-windows-jdk.msi", + "https://corretto.aws/downloads/latest/amazon-corretto-11-x64-windows-jdk.zip", + "https://corretto.aws/downloads/latest/amazon-corretto-11-x86-windows-jdk.zip" + ], + "Property": "ResponseUri.Headers.Location", + "MatchVersion": "(\\d+(\\.\\d+){1,4})" + } + }, + "Install": { + "Setup": "amazon-corretto-*.msi", + "Physical": { + "Arguments": "/install /passive /norestart", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "/install /passive /norestart", + "PostInstall": [] + } + } +} \ No newline at end of file diff --git a/Evergreen/Manifests/AmazonCorretto15.json b/Evergreen/Manifests/AmazonCorretto15.json new file mode 100644 index 00000000..5dc44c17 --- /dev/null +++ b/Evergreen/Manifests/AmazonCorretto15.json @@ -0,0 +1,28 @@ +{ + "Name": "Amazon Corretto 15", + "Source": "https://aws.amazon.com/corretto/", + "Get": { + "Update": { + "Uri": "" + }, + "Download": { + "Uri": [ + "https://corretto.aws/downloads/latest/amazon-corretto-15-x64-windows-jdk.msi", + "https://corretto.aws/downloads/latest/amazon-corretto-15-x64-windows-jdk.zip" + ], + "Property": "ResponseUri.Headers.Location", + "MatchVersion": "(\\d+(\\.\\d+){1,4})" + } + }, + "Install": { + "Setup": "amazon-corretto-*.msi", + "Physical": { + "Arguments": "/install /passive /norestart", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "/install /passive /norestart", + "PostInstall": [] + } + } +} \ No newline at end of file diff --git a/Evergreen/Manifests/AmazonCorretto16.json b/Evergreen/Manifests/AmazonCorretto16.json new file mode 100644 index 00000000..d2a194a7 --- /dev/null +++ b/Evergreen/Manifests/AmazonCorretto16.json @@ -0,0 +1,28 @@ +{ + "Name": "Amazon Corretto 16", + "Source": "https://aws.amazon.com/corretto/", + "Get": { + "Update": { + "Uri": "" + }, + "Download": { + "Uri": [ + "https://corretto.aws/downloads/latest/amazon-corretto-16-x64-windows-jdk.msi", + "https://corretto.aws/downloads/latest/amazon-corretto-16-x64-windows-jdk.zip" + ], + "Property": "ResponseUri.Headers.Location", + "MatchVersion": "(\\d+(\\.\\d+){1,4})" + } + }, + "Install": { + "Setup": "amazon-corretto-*.msi", + "Physical": { + "Arguments": "/install /passive /norestart", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "/install /passive /norestart", + "PostInstall": [] + } + } +} \ No newline at end of file diff --git a/Evergreen/Manifests/AmazonCorretto17.json b/Evergreen/Manifests/AmazonCorretto17.json new file mode 100644 index 00000000..a4dc46d1 --- /dev/null +++ b/Evergreen/Manifests/AmazonCorretto17.json @@ -0,0 +1,28 @@ +{ + "Name": "Amazon Corretto 17", + "Source": "https://aws.amazon.com/corretto/", + "Get": { + "Update": { + "Uri": "" + }, + "Download": { + "Uri": [ + "https://corretto.aws/downloads/latest/amazon-corretto-17-x64-windows-jdk.msi", + "https://corretto.aws/downloads/latest/amazon-corretto-17-x64-windows-jdk.zip" + ], + "Property": "ResponseUri.Headers.Location", + "MatchVersion": "(\\d+(\\.\\d+){1,4})" + } + }, + "Install": { + "Setup": "amazon-corretto-*.msi", + "Physical": { + "Arguments": "/install /passive /norestart", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "/install /passive /norestart", + "PostInstall": [] + } + } +} \ No newline at end of file diff --git a/Evergreen/Manifests/AmazonCorretto20.json b/Evergreen/Manifests/AmazonCorretto20.json new file mode 100644 index 00000000..e3e868cb --- /dev/null +++ b/Evergreen/Manifests/AmazonCorretto20.json @@ -0,0 +1,28 @@ +{ + "Name": "Amazon Corretto 20", + "Source": "https://aws.amazon.com/corretto/", + "Get": { + "Update": { + "Uri": "" + }, + "Download": { + "Uri": [ + "https://corretto.aws/downloads/latest/amazon-corretto-20-x64-windows-jdk.msi", + "https://corretto.aws/downloads/latest/amazon-corretto-20-x64-windows-jdk.zip" + ], + "Property": "ResponseUri.Headers.Location", + "MatchVersion": "(\\d+(\\.\\d+){1,4})" + } + }, + "Install": { + "Setup": "amazon-corretto-*.msi", + "Physical": { + "Arguments": "/install /passive /norestart", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "/install /passive /norestart", + "PostInstall": [] + } + } +} \ No newline at end of file diff --git a/Evergreen/Manifests/AmazonCorretto21.json b/Evergreen/Manifests/AmazonCorretto21.json new file mode 100644 index 00000000..5ee020c7 --- /dev/null +++ b/Evergreen/Manifests/AmazonCorretto21.json @@ -0,0 +1,28 @@ +{ + "Name": "Amazon Corretto 21", + "Source": "https://aws.amazon.com/corretto/", + "Get": { + "Update": { + "Uri": "" + }, + "Download": { + "Uri": [ + "https://corretto.aws/downloads/latest/amazon-corretto-21-x64-windows-jdk.msi", + "https://corretto.aws/downloads/latest/amazon-corretto-21-x64-windows-jdk.zip" + ], + "Property": "ResponseUri.Headers.Location", + "MatchVersion": "(\\d+(\\.\\d+){1,4})" + } + }, + "Install": { + "Setup": "amazon-corretto-*.msi", + "Physical": { + "Arguments": "/install /passive /norestart", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "/install /passive /norestart", + "PostInstall": [] + } + } +} \ No newline at end of file diff --git a/Evergreen/Manifests/AmazonCorretto22.json b/Evergreen/Manifests/AmazonCorretto22.json new file mode 100644 index 00000000..49ab6f5d --- /dev/null +++ b/Evergreen/Manifests/AmazonCorretto22.json @@ -0,0 +1,28 @@ +{ + "Name": "Amazon Corretto 22", + "Source": "https://aws.amazon.com/corretto/", + "Get": { + "Update": { + "Uri": "" + }, + "Download": { + "Uri": [ + "https://corretto.aws/downloads/latest/amazon-corretto-22-x64-windows-jdk.msi", + "https://corretto.aws/downloads/latest/amazon-corretto-22-x64-windows-jdk.zip" + ], + "Property": "ResponseUri.Headers.Location", + "MatchVersion": "(\\d+(\\.\\d+){1,4})" + } + }, + "Install": { + "Setup": "amazon-corretto-*.msi", + "Physical": { + "Arguments": "/install /passive /norestart", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "/install /passive /norestart", + "PostInstall": [] + } + } +} \ No newline at end of file diff --git a/Evergreen/Manifests/AmazonCorretto8.json b/Evergreen/Manifests/AmazonCorretto8.json new file mode 100644 index 00000000..61333bc4 --- /dev/null +++ b/Evergreen/Manifests/AmazonCorretto8.json @@ -0,0 +1,30 @@ +{ + "Name": "Amazon Corretto 8", + "Source": "https://aws.amazon.com/corretto/", + "Get": { + "Update": { + "Uri": "" + }, + "Download": { + "Uri": [ + "https://corretto.aws/downloads/latest/amazon-corretto-8-x64-windows-jdk.msi", + "https://corretto.aws/downloads/latest/amazon-corretto-8-x64-windows-jre.zip", + "https://corretto.aws/downloads/latest/amazon-corretto-8-x86-windows-jdk.msi", + "https://corretto.aws/downloads/latest/amazon-corretto-8-x86-windows-jre.zip" + ], + "Property": "ResponseUri.Headers.Location", + "MatchVersion": "(\\d+(\\.\\d+){1,4})" + } + }, + "Install": { + "Setup": "amazon-corretto-*.msi", + "Physical": { + "Arguments": "/install /passive /norestart", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "/install /passive /norestart", + "PostInstall": [] + } + } +} \ No newline at end of file diff --git a/Evergreen/Shared/Get-AmazonCorretto.ps1 b/Evergreen/Shared/Get-AmazonCorretto.ps1 new file mode 100644 index 00000000..062a2bbd --- /dev/null +++ b/Evergreen/Shared/Get-AmazonCorretto.ps1 @@ -0,0 +1,37 @@ +function Get-AmazonCorretto { + <# + .NOTES + Author: Aaron Parker + Twitter: @stealthpuppy + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $false)] + param ( + [Parameter(Mandatory = $false, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Get the latest download + foreach ($Url in $res.Get.Download.Uri) { + + # Resolve the URI from the download URL + $Response = Resolve-SystemNetWebRequest -Uri $Url + + # Replace text to build the checksum URL + $ChecksumUrl = $Url -replace "latest", "latest_checksum" + + # Construct the output; Return the custom object to the pipeline + if ($null -ne $Response) { + $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 + Type = Get-FileType -File $Response.ResponseUri.AbsoluteUri + URI = $Response.ResponseUri.AbsoluteUri + } + Write-Output -InputObject $PSObject + } + } +} From 3635abfd22299a1e3783dee197fa767853f5c1d6 Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Sun, 7 Jul 2024 21:53:52 +1000 Subject: [PATCH 3/8] Update Get-AtlassianSourcetree.ps1 Remove unneeded version strings --- Evergreen/Apps/Get-AtlassianSourcetree.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Evergreen/Apps/Get-AtlassianSourcetree.ps1 b/Evergreen/Apps/Get-AtlassianSourcetree.ps1 index 140d9c6c..4826567f 100644 --- a/Evergreen/Apps/Get-AtlassianSourcetree.ps1 +++ b/Evergreen/Apps/Get-AtlassianSourcetree.ps1 @@ -38,10 +38,11 @@ Function Get-AtlassianSourcetree { ForEach ($item in $res.Get.Download.Uri.GetEnumerator()) { # Build the output object; Output object to the pipeline + $Url = $res.Get.Download.Uri[$item.Key] -replace $res.Get.Download.ReplaceText, $Version $PSObject = [PSCustomObject] @{ Version = $Version - Type = $item.Name - URI = $res.Get.Download.Uri[$item.Key] -replace $res.Get.Download.ReplaceText, $Version + Type = Get-FileType -File $Url + URI = $Url } Write-Output -InputObject $PSObject } From aab1c5904cc3596f983d5a76d6f97cbb2a69d8cc Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Sun, 7 Jul 2024 21:54:05 +1000 Subject: [PATCH 4/8] Update Get-AutodeskFusion360.ps1 --- Evergreen/Apps/Get-AutodeskFusion360.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Evergreen/Apps/Get-AutodeskFusion360.ps1 b/Evergreen/Apps/Get-AutodeskFusion360.ps1 index 3113b7ee..6b4a403a 100644 --- a/Evergreen/Apps/Get-AutodeskFusion360.ps1 +++ b/Evergreen/Apps/Get-AutodeskFusion360.ps1 @@ -25,8 +25,8 @@ Function Get-AutodeskFusion360 { # Build object and output to the pipeline $PSObject = [PSCustomObject] @{ Version = $Versions.'build-version' - BuildVersion = $Versions.'build-version' - MajorBuildVersion = $Versions.'major-update-version' + #BuildVersion = $Versions.'build-version' + #MajorBuildVersion = $Versions.'major-update-version' Type = Get-FileType -File $Url Filename = (Split-Path -Path $Url -Leaf).Replace('%20', ' ') URI = $Url From 128d92d645b55b4f1413d392d4b5d73945b86aeb Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Sun, 7 Jul 2024 22:08:09 +1000 Subject: [PATCH 5/8] Update Get-JabraDirect.ps1 --- Evergreen/Apps/Get-JabraDirect.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/Evergreen/Apps/Get-JabraDirect.ps1 b/Evergreen/Apps/Get-JabraDirect.ps1 index ce0a36b2..4972ccaa 100644 --- a/Evergreen/Apps/Get-JabraDirect.ps1 +++ b/Evergreen/Apps/Get-JabraDirect.ps1 @@ -23,7 +23,6 @@ Function Get-JabraDirect { $PSObject = [PSCustomObject] @{ Version = $Content.WindowsVersion Architecture = "x64" - ReleaseNotes = $Content.WindowsReleaseNotes Type = Get-FileType -File $Content.WindowsDownload Sha256 = $Content.WindowsSHA256 URI = $Content.WindowsDownload From a0a41a7c73e95be45a323b6139e9f381cb156a49 Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Sun, 7 Jul 2024 22:46:12 +1000 Subject: [PATCH 6/8] Remove OpenJDK #712 --- {Evergreen/Apps => Disabled}/Get-OpenJDK.ps1 | 0 {Evergreen/Manifests => Disabled}/OpenJDK.json | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename {Evergreen/Apps => Disabled}/Get-OpenJDK.ps1 (100%) rename {Evergreen/Manifests => Disabled}/OpenJDK.json (100%) diff --git a/Evergreen/Apps/Get-OpenJDK.ps1 b/Disabled/Get-OpenJDK.ps1 similarity index 100% rename from Evergreen/Apps/Get-OpenJDK.ps1 rename to Disabled/Get-OpenJDK.ps1 diff --git a/Evergreen/Manifests/OpenJDK.json b/Disabled/OpenJDK.json similarity index 100% rename from Evergreen/Manifests/OpenJDK.json rename to Disabled/OpenJDK.json From 15ddb79324747863230c63b76bbb8d44680a245c Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Sun, 7 Jul 2024 23:22:00 +1000 Subject: [PATCH 7/8] Update Get-PiriformCCleanerFree.ps1 Fix filename --- Evergreen/Apps/Get-PiriformCCleanerFree.ps1 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Evergreen/Apps/Get-PiriformCCleanerFree.ps1 b/Evergreen/Apps/Get-PiriformCCleanerFree.ps1 index 6076bda3..6fdaa202 100644 --- a/Evergreen/Apps/Get-PiriformCCleanerFree.ps1 +++ b/Evergreen/Apps/Get-PiriformCCleanerFree.ps1 @@ -27,17 +27,17 @@ Function Get-PiriformCCleanerFree { if ($null -ne $Update) { # Grab the download link headers to find the file name - $params = @{ - Uri = $res.Get.Download.Uri - Method = "Head" - ReturnObject = "Headers" - } - $Headers = Invoke-EvergreenWebRequest @params - $Filename = [RegEx]::Match($Headers['Content-Disposition'], $res.Get.Download.MatchFilename).Captures.Groups[1].Value + # $params = @{ + # Uri = $res.Get.Download.Uri + # Method = "Head" + # ReturnObject = "Headers" + # } + # $Headers = Invoke-EvergreenWebRequest @params + # $Filename = [RegEx]::Match($Headers['Content-Disposition'], $res.Get.Download.MatchFilename).Captures.Groups[1].Value $PSObject = [PSCustomObject] @{ Version = ($Update -split "\|")[2] - Filename = $Filename + Filename = (Split-Path -Path $($Update -split "\|")[-2] -Leaf) URI = $res.Get.Download.Uri } Write-Output -InputObject $PSObject From 58722e04882a29a3b31c9a1c3230a572d77042c4 Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Mon, 8 Jul 2024 08:19:12 +1000 Subject: [PATCH 8/8] Update Get-GitHubRepoRelease.ps1 Remove Platform value from output --- Evergreen/Shared/Get-GitHubRepoRelease.ps1 | 27 ++++++++++++---------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Evergreen/Shared/Get-GitHubRepoRelease.ps1 b/Evergreen/Shared/Get-GitHubRepoRelease.ps1 index 46505480..5cbfbb23 100644 --- a/Evergreen/Shared/Get-GitHubRepoRelease.ps1 +++ b/Evergreen/Shared/Get-GitHubRepoRelease.ps1 @@ -184,20 +184,23 @@ function Get-GitHubRepoRelease { } # Build the output object - $PSObject = [PSCustomObject] @{ - Version = $Version - Platform = Get-Platform -String $asset.browser_download_url - Architecture = Get-Architecture -String $(Split-Path -Path $asset.browser_download_url -Leaf) - Type = [System.IO.Path]::GetExtension($asset.browser_download_url).Split(".")[-1] - InstallerType = Get-InstallerType -String $asset.browser_download_url - Date = ConvertTo-DateTime -DateTime $item.created_at -Pattern "MM/dd/yyyy HH:mm:ss" - Size = $asset.size - URI = $asset.browser_download_url - } - Write-Verbose -Message "$($MyInvocation.MyCommand): Matching platform 'Windows' against: $($PSObject.Platform)." - if ($PSObject.Platform -eq "Windows") { + if ((Get-Platform -String $asset.browser_download_url) -eq "Windows") { + $PSObject = [PSCustomObject] @{ + Version = $Version + Date = ConvertTo-DateTime -DateTime $item.created_at -Pattern "MM/dd/yyyy HH:mm:ss" + Size = $asset.size + #Platform = Get-Platform -String $asset.browser_download_url + Architecture = Get-Architecture -String $(Split-Path -Path $asset.browser_download_url -Leaf) + InstallerType = Get-InstallerType -String $asset.browser_download_url + Type = [System.IO.Path]::GetExtension($asset.browser_download_url).Split(".")[-1] + URI = $asset.browser_download_url + } Write-Output -InputObject $PSObject } + # Write-Verbose -Message "$($MyInvocation.MyCommand): Matching platform 'Windows' against: $($PSObject.Platform)." + # if ($PSObject.Platform -eq "Windows") { + # Write-Output -InputObject $PSObject + # } } else { Write-Verbose -Message "$($MyInvocation.MyCommand): Skip: $($asset.browser_download_url)."