mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 13:17:54 +00:00
sort java versions (#3045)
This commit is contained in:
committed by
GitHub
parent
b08f5f471b
commit
826fed9604
@@ -1,6 +1,6 @@
|
||||
function Get-JavaVersions {
|
||||
$toolcachePath = Join-Path $env:AGENT_TOOLSDIRECTORY "Java_Adopt_jdk"
|
||||
$javaToolcacheVersions = Get-ChildItem $toolcachePath -Name | Sort-Object -Descending
|
||||
$javaToolcacheVersions = Get-ChildItem $toolcachePath -Name | Sort-Object { [int]$_.Split(".")[0] }
|
||||
|
||||
return $javaToolcacheVersions | ForEach-Object {
|
||||
$majorVersion = $_.split(".")[0]
|
||||
|
||||
Reference in New Issue
Block a user