-
Notifications
You must be signed in to change notification settings - Fork 578
[build] Recommend latest supported JDK in workload metadata #12500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -165,7 +165,7 @@ JProperty CreateJdkProperty (XDocument doc) | |
| var v = new Version (JdkVersion ?? "17.0"); | ||
| var start = new Version (v.Major, v.Minor); | ||
| var end = GetMaxJdkVersion (v); | ||
| var latestRevision = JdkVersion ?? GetLatestRevision (doc, "jdk"); | ||
| var latestRevision = GetLatestRevision (doc, "jdk", start, new Version (end)); | ||
| var contents = new JObject ( | ||
| new JProperty ("version", $"[{start},{end})")); | ||
| if (!string.IsNullOrEmpty (latestRevision)) | ||
|
|
@@ -202,9 +202,13 @@ IEnumerable<XElement> GetSupportedElements (XDocument doc, string element) | |
| .OrderByRevision (); | ||
| } | ||
|
|
||
| string? GetLatestRevision (XDocument doc, string element) | ||
| string? GetLatestRevision (XDocument doc, string element, Version minimumVersion, Version maximumVersion) | ||
| { | ||
| return GetByRevisions (doc, element) | ||
| .Where (item => { | ||
| var version = new Version (item.Revision); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤖 ❌ Error handling — Rule: Preserve existing input normalization
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this it just saying |
||
| return version >= minimumVersion && version < maximumVersion; | ||
| }) | ||
| .LastOrDefault () | ||
| .Revision; | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.