File tree Expand file tree Collapse file tree 8 files changed +103
-2
lines changed
Expand file tree Collapse file tree 8 files changed +103
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,25 @@ function Get-MicrosoftOpenJDK11 {
1313 $res = (Get-FunctionResource - AppName (" $ ( $MyInvocation.MyCommand ) " .Split(" -" ))[1 ])
1414 )
1515
16+ # Output the results from Get-AdoptiumTemurin
1617 $Output = Get-AdoptiumTemurin - res $res
1718 Write-Output - InputObject $Output
19+
20+ if ($Output -and $Output.Count -gt 0 ) {
21+ # Capture the version number from the first output object
22+ $Output [0 ].Version -match $res.Get.Download.VersionPattern | Out-Null
23+ $Version = $Matches [0 ]
24+
25+ # Output the download links for additional file types
26+ foreach ($Uri in $res.Get.Download.Uri ) {
27+ [PSCustomObject ]@ {
28+ Version = $Output [0 ].Version
29+ Date = $Output [0 ].Date
30+ ImageType = $Output [0 ].ImageType
31+ Architecture = Get-Architecture - String $Uri
32+ Type = Get-FileType - File $Uri
33+ URI = (Resolve-SystemNetWebRequest - Uri ($Uri -replace " #version" , $Version )).ResponseUri.AbsoluteUri
34+ }
35+ }
36+ }
1837}
Original file line number Diff line number Diff line change @@ -13,6 +13,25 @@ function Get-MicrosoftOpenJDK17 {
1313 $res = (Get-FunctionResource - AppName (" $ ( $MyInvocation.MyCommand ) " .Split(" -" ))[1 ])
1414 )
1515
16+ # Output the results from Get-AdoptiumTemurin
1617 $Output = Get-AdoptiumTemurin - res $res
1718 Write-Output - InputObject $Output
19+
20+ if ($Output -and $Output.Count -gt 0 ) {
21+ # Capture the version number from the first output object
22+ $Output [0 ].Version -match $res.Get.Download.VersionPattern | Out-Null
23+ $Version = $Matches [0 ]
24+
25+ # Output the download links for additional file types
26+ foreach ($Uri in $res.Get.Download.Uri ) {
27+ [PSCustomObject ]@ {
28+ Version = $Output [0 ].Version
29+ Date = $Output [0 ].Date
30+ ImageType = $Output [0 ].ImageType
31+ Architecture = Get-Architecture - String $Uri
32+ Type = Get-FileType - File $Uri
33+ URI = (Resolve-SystemNetWebRequest - Uri ($Uri -replace " #version" , $Version )).ResponseUri.AbsoluteUri
34+ }
35+ }
36+ }
1837}
Original file line number Diff line number Diff line change @@ -13,6 +13,25 @@ function Get-MicrosoftOpenJDK21 {
1313 $res = (Get-FunctionResource - AppName (" $ ( $MyInvocation.MyCommand ) " .Split(" -" ))[1 ])
1414 )
1515
16+ # Output the results from Get-AdoptiumTemurin
1617 $Output = Get-AdoptiumTemurin - res $res
1718 Write-Output - InputObject $Output
19+
20+ if ($Output -and $Output.Count -gt 0 ) {
21+ # Capture the version number from the first output object
22+ $Output [0 ].Version -match $res.Get.Download.VersionPattern | Out-Null
23+ $Version = $Matches [0 ]
24+
25+ # Output the download links for additional file types
26+ foreach ($Uri in $res.Get.Download.Uri ) {
27+ [PSCustomObject ]@ {
28+ Version = $Output [0 ].Version
29+ Date = $Output [0 ].Date
30+ ImageType = $Output [0 ].ImageType
31+ Architecture = Get-Architecture - String $Uri
32+ Type = Get-FileType - File $Uri
33+ URI = (Resolve-SystemNetWebRequest - Uri ($Uri -replace " #version" , $Version )).ResponseUri.AbsoluteUri
34+ }
35+ }
36+ }
1837}
Original file line number Diff line number Diff line change @@ -13,6 +13,25 @@ function Get-MicrosoftOpenJDK25 {
1313 $res = (Get-FunctionResource - AppName (" $ ( $MyInvocation.MyCommand ) " .Split(" -" ))[1 ])
1414 )
1515
16+ # Output the results from Get-AdoptiumTemurin
1617 $Output = Get-AdoptiumTemurin - res $res
1718 Write-Output - InputObject $Output
19+
20+ if ($Output -and $Output.Count -gt 0 ) {
21+ # Capture the version number from the first output object
22+ $Output [0 ].Version -match $res.Get.Download.VersionPattern | Out-Null
23+ $Version = $Matches [0 ]
24+
25+ # Output the download links for additional file types
26+ foreach ($Uri in $res.Get.Download.Uri ) {
27+ [PSCustomObject ]@ {
28+ Version = $Output [0 ].Version
29+ Date = $Output [0 ].Date
30+ ImageType = $Output [0 ].ImageType
31+ Architecture = Get-Architecture - String $Uri
32+ Type = Get-FileType - File $Uri
33+ URI = (Resolve-SystemNetWebRequest - Uri ($Uri -replace " #version" , $Version )).ResponseUri.AbsoluteUri
34+ }
35+ }
36+ }
1837}
Original file line number Diff line number Diff line change 77 "ContentType" : " application/json" ,
88 "MatchImage" : " jdk|jre" ,
99 "ResolveUri" : true
10+ },
11+ "Download" : {
12+ "Uri" : [
13+ " https://aka.ms/download-jdk/microsoft-jdk-#version-windows-x64.exe" ,
14+ " https://aka.ms/download-jdk/microsoft-jdk-#version-windows-aarch64.exe"
15+ ],
16+ "VersionPattern" : " ^(.*?)(?=\\ +)"
1017 }
1118 },
1219 "Install" : {
Original file line number Diff line number Diff line change 77 "ContentType" : " application/json" ,
88 "MatchImage" : " jdk|jre" ,
99 "ResolveUri" : true
10+ },
11+ "Download" : {
12+ "Uri" : [
13+ " https://aka.ms/download-jdk/microsoft-jdk-#version-windows-x64.exe" ,
14+ " https://aka.ms/download-jdk/microsoft-jdk-#version-windows-aarch64.exe"
15+ ],
16+ "VersionPattern" : " ^(.*?)(?=\\ +)"
1017 }
1118 },
1219 "Install" : {
Original file line number Diff line number Diff line change 88 "ContentType" : " application/json" ,
99 "MatchImage" : " jdk|jre" ,
1010 "ResolveUri" : true
11+ },
12+ "Download" : {
13+ "Uri" : [
14+ " https://aka.ms/download-jdk/microsoft-jdk-#version-windows-x64.exe"
15+ ],
16+ "VersionPattern" : " ^(.*?)(?=\\ +)"
1117 }
1218 },
1319 "Install" : {
Original file line number Diff line number Diff line change 1-
21{
32 "Name" : " Microsoft OpenJDK 25" ,
43 "Source" : " https://www.microsoft.com/openjdk" ,
87 "ContentType" : " application/json" ,
98 "MatchImage" : " jdk|jre" ,
109 "ResolveUri" : true
10+ },
11+ "Download" : {
12+ "Uri" : [
13+ " https://aka.ms/download-jdk/microsoft-jdk-#version-windows-x64.exe"
14+ ],
15+ "VersionPattern" : " ^(.*?)(?=\\ +)"
1116 }
1217 },
1318 "Install" : {
2126 "PostInstall" : []
2227 }
2328 }
24- }
29+ }
You can’t perform that action at this time.
0 commit comments