From 7239d6da0cc1e9a5c57f04d36e04ce139c5bf928 Mon Sep 17 00:00:00 2001 From: Mark Vieira Date: Wed, 11 Sep 2024 13:35:26 -0700 Subject: [PATCH] Fix verifyVersions task --- .../java/org/elasticsearch/gradle/internal/BwcVersions.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/BwcVersions.java b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/BwcVersions.java index 720c159f75552..7b1bc14fda8af 100644 --- a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/BwcVersions.java +++ b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/BwcVersions.java @@ -223,7 +223,10 @@ public void compareToAuthoritative(List authoritativeReleasedVersions) } private List getReleased() { - return versions.stream().filter(v -> unreleased.containsKey(v) == false).toList(); + return versions.stream() + .filter(v -> v.getMajor() >= currentVersion.getMajor() - 1) + .filter(v -> unreleased.containsKey(v) == false) + .toList(); } /**