Skip to content

Commit

Permalink
Merge pull request #541 from aaronparker/development
Browse files Browse the repository at this point in the history
Java, Java, Java
  • Loading branch information
aaronparker authored Sep 3, 2023
2 parents bf7914a + 2b69a12 commit cf06e1e
Show file tree
Hide file tree
Showing 71 changed files with 934 additions and 123 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ jobs:

pestertest5:
name: "Run Pester tests on Windows PowerShell (development push)"
needs: psscriptanalyzer
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"autocrlf",
"AWSCLI",
"AWSSAMCLI",
"Azul",
"Bitness",
"Bitwarden",
"Cendio",
"centos",
Expand Down Expand Up @@ -48,6 +50,7 @@
"iainbrighton",
"Karakun",
"latestversion",
"Liberica",
"Linc",
"linkid",
"LTSC",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 2 additions & 17 deletions Evergreen/Apps/Get-AdoptiumTemurin11.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,6 @@ Function Get-AdoptiumTemurin11 {
$res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1])
)

# Pass the repo releases API URL and return a formatted object
$Releases = Invoke-RestMethodWrapper -Uri $res.Get.Update.Uri
$Targets = $Releases.binary | Where-Object { $_.os -eq $res.Get.Update.MatchOS `
-and $_.image_type -match $res.Get.Update.MatchImage }
ForEach ($Release in $Targets) {
if ($Null -ne $Release.installer) {
$PSObject = [PSCustomObject]@{
Version = ($Release.scm_ref -split "_")[0]
Type = $Release.image_type
Architecture = Get-Architecture -String $Release.architecture
Checksum = $Release.installer.checksum
Size = $Release.installer.size
URI = $Release.installer.link
}
Write-Output -InputObject $PSObject
}
}
$Output = Get-AdoptiumTemurin -res $res
Write-Output -InputObject $Output
}
25 changes: 5 additions & 20 deletions Evergreen/Apps/Get-AdoptiumTemurin16.ps1
Original file line number Diff line number Diff line change
@@ -1,33 +1,18 @@
Function Get-AdoptiumTemurin16 {
function Get-AdoptiumTemurin16 {
<#
.NOTES
Author: Aaron Parker
Twitter: @stealthpuppy
#>
[OutputType([System.Management.Automation.PSObject])]
[CmdletBinding(SupportsShouldProcess = $False)]
[CmdletBinding(SupportsShouldProcess = $false)]
param (
[Parameter(Mandatory = $False, Position = 0)]
[Parameter(Mandatory = $false, Position = 0)]
[ValidateNotNull()]
[System.Management.Automation.PSObject]
$res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1])
)

# Pass the repo releases API URL and return a formatted object
$Releases = Invoke-RestMethodWrapper -Uri $res.Get.Update.Uri
$Targets = $Releases.binary | Where-Object { $_.os -eq $res.Get.Update.MatchOS `
-and $_.image_type -match $res.Get.Update.MatchImage }
ForEach ($Release in $Targets) {
if ($Null -ne $Release.installer) {
$PSObject = [PSCustomObject]@{
Version = ($Release.scm_ref -split "_")[0]
Type = $Release.image_type
Architecture = Get-Architecture -String $Release.architecture
Checksum = $Release.installer.checksum
Size = $Release.installer.size
URI = $Release.installer.link
}
Write-Output -InputObject $PSObject
}
}
$Output = Get-AdoptiumTemurin -res $res
Write-Output -InputObject $Output
}
19 changes: 2 additions & 17 deletions Evergreen/Apps/Get-AdoptiumTemurin17.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,6 @@ Function Get-AdoptiumTemurin17 {
$res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1])
)

# Pass the repo releases API URL and return a formatted object
$Releases = Invoke-RestMethodWrapper -Uri $res.Get.Update.Uri
$Targets = $Releases.binary | Where-Object { $_.os -eq $res.Get.Update.MatchOS `
-and $_.image_type -match $res.Get.Update.MatchImage }
ForEach ($Release in $Targets) {
if ($Null -ne $Release.installer) {
$PSObject = [PSCustomObject]@{
Version = ($Release.scm_ref -split "_")[0]
Type = $Release.image_type
Architecture = Get-Architecture -String $Release.architecture
Checksum = $Release.installer.checksum
Size = $Release.installer.size
URI = $Release.installer.link
}
Write-Output -InputObject $PSObject
}
}
$Output = Get-AdoptiumTemurin -res $res
Write-Output -InputObject $Output
}
19 changes: 2 additions & 17 deletions Evergreen/Apps/Get-AdoptiumTemurin18.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,6 @@ Function Get-AdoptiumTemurin18 {
$res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1])
)

# Pass the repo releases API URL and return a formatted object
$Releases = Invoke-RestMethodWrapper -Uri $res.Get.Update.Uri
$Targets = $Releases.binary | Where-Object { $_.os -eq $res.Get.Update.MatchOS `
-and $_.image_type -match $res.Get.Update.MatchImage }
ForEach ($Release in $Targets) {
if ($Null -ne $Release.installer) {
$PSObject = [PSCustomObject]@{
Version = ($Release.scm_ref -split "_")[0]
Type = $Release.image_type
Architecture = Get-Architecture -String $Release.architecture
Checksum = $Release.installer.checksum
Size = $Release.installer.size
URI = $Release.installer.link
}
Write-Output -InputObject $PSObject
}
}
$Output = Get-AdoptiumTemurin -res $res
Write-Output -InputObject $Output
}
18 changes: 18 additions & 0 deletions Evergreen/Apps/Get-AdoptiumTemurin19.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Function Get-AdoptiumTemurin19 {
<#
.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])
)

$Output = Get-AdoptiumTemurin -res $res
Write-Output -InputObject $Output
}
18 changes: 18 additions & 0 deletions Evergreen/Apps/Get-AdoptiumTemurin20.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Function Get-AdoptiumTemurin20 {
<#
.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])
)

$Output = Get-AdoptiumTemurin -res $res
Write-Output -InputObject $Output
}
19 changes: 2 additions & 17 deletions Evergreen/Apps/Get-AdoptiumTemurin8.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,6 @@ Function Get-AdoptiumTemurin8 {
$res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1])
)

# Pass the repo releases API URL and return a formatted object
$Releases = Invoke-RestMethodWrapper -Uri $res.Get.Update.Uri
$Targets = $Releases.binary | Where-Object { $_.os -eq $res.Get.Update.MatchOS `
-and $_.image_type -match $res.Get.Update.MatchImage }
ForEach ($Release in $Targets) {
if ($Null -ne $Release.installer) {
$PSObject = [PSCustomObject]@{
Version = ($Release.scm_ref -split "_")[0]
Type = $Release.image_type
Architecture = Get-Architecture -String $Release.architecture
Checksum = $Release.installer.checksum
Size = $Release.installer.size
URI = $Release.installer.link
}
Write-Output -InputObject $PSObject
}
}
$Output = Get-AdoptiumTemurin -res $res
Write-Output -InputObject $Output
}
21 changes: 9 additions & 12 deletions Evergreen/Apps/Get-AmazonCorretto.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Function Get-AmazonCorretto {
function Get-AmazonCorretto {
<#
.SYNOPSIS
Get the current versions and download URLs for Amazon Corretto 8, 11, 15 and 16.
Expand All @@ -8,31 +8,28 @@ Function Get-AmazonCorretto {
Twitter: @adotcoop
#>
[OutputType([System.Management.Automation.PSObject])]
[CmdletBinding(SupportsShouldProcess = $False)]
[CmdletBinding(SupportsShouldProcess = $false)]
param (
[Parameter(Mandatory = $False, Position = 0)]
[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()) {
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()) {

$Url = $JDKType.Value
$Response = Resolve-SystemNetWebRequest -Uri $Url
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
#NOTE: Version can now be returned with `Get-GitHubRepoRelease -ReturnVersionOnly`
If ($Null -ne $Response) {
if ($null -ne $Response) {
$PSObject = [PSCustomObject] @{
Version = [RegEx]::Match($Response.ResponseUri.LocalPath, $res.Get.Download.MatchVersion).Captures.Groups[1].Value
Architecture = Get-Architecture -String $Url
JDK = $JDKversion.Name
Type = [System.IO.Path]::GetExtension($Url).Split(".")[-1]
Architecture = Get-Architecture -String $JDKType.Value
Type = [System.IO.Path]::GetExtension($JDKType.Value).Split(".")[-1]
URI = $Response.ResponseUri.AbsoluteUri
}
Write-Output -InputObject $PSObject
Expand Down
18 changes: 18 additions & 0 deletions Evergreen/Apps/Get-AzulZulu11.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
function Get-AzulZulu11 {
<#
.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])
)

$Output = Get-AdoptiumTemurin -res $res
Write-Output -InputObject $Output
}
18 changes: 18 additions & 0 deletions Evergreen/Apps/Get-AzulZulu17.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
function Get-AzulZulu17 {
<#
.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])
)

$Output = Get-AdoptiumTemurin -res $res
Write-Output -InputObject $Output
}
18 changes: 18 additions & 0 deletions Evergreen/Apps/Get-AzulZulu8.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
function Get-AzulZulu8 {
<#
.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])
)

$Output = Get-AdoptiumTemurin -res $res
Write-Output -InputObject $Output
}
18 changes: 18 additions & 0 deletions Evergreen/Apps/Get-BellSoftLibericaJDK11.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
function Get-BellSoftLibericaJDK11 {
<#
.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])
)

$Output = Get-BellSoftLibericaJDK -res $res
Write-Output -InputObject $Output
}
18 changes: 18 additions & 0 deletions Evergreen/Apps/Get-BellSoftLibericaJDK17.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
function Get-BellSoftLibericaJDK17 {
<#
.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])
)

$Output = Get-BellSoftLibericaJDK -res $res
Write-Output -InputObject $Output
}
18 changes: 18 additions & 0 deletions Evergreen/Apps/Get-BellSoftLibericaJDK20.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
function Get-BellSoftLibericaJDK20 {
<#
.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])
)

$Output = Get-BellSoftLibericaJDK -res $res
Write-Output -InputObject $Output
}
18 changes: 18 additions & 0 deletions Evergreen/Apps/Get-BellSoftLibericaJDK8.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
function Get-BellSoftLibericaJDK8 {
<#
.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])
)

$Output = Get-BellSoftLibericaJDK -res $res
Write-Output -InputObject $Output
}
18 changes: 18 additions & 0 deletions Evergreen/Apps/Get-MicrosoftOpenJDK11.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
function Get-MicrosoftOpenJDK11 {
<#
.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])
)

$Output = Get-AdoptiumTemurin -res $res
Write-Output -InputObject $Output
}
Loading

0 comments on commit cf06e1e

Please sign in to comment.