Skip to content

Commit

Permalink
Merge branch 'main' into java-e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx authored Apr 29, 2024
2 parents b680cd7 + 07884eb commit 868109a
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/plugins/core/java.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,17 +415,7 @@ fn fuzzy_match_filter(versions: Vec<String>, query: &str) -> eyre::Result<Vec<St
if query == "latest" {
query = "[0-9].*";
}

// check for major versions (e.g. openjdk-17)
// for which we fuzzy match the exact version without minor/patch (see #1887)
let major_version_regex = Regex::new(r"[a-z]-\d{1,}$")?;
let query_regex_str = if major_version_regex.is_match(query) {
format!("^{}([+-].+)?$", query)
} else {
format!("^{}([+-.].+)?$", query)
};

let query_regex = Regex::new(&query_regex_str)?;
let query_regex = Regex::new(&format!("^{}([+-.].+)?$", query))?;
let versions = versions
.into_iter()
.filter(|v| {
Expand Down

0 comments on commit 868109a

Please sign in to comment.