From 82d1d0ec08ae16bf0ca1d74bb320586a8301d3f9 Mon Sep 17 00:00:00 2001 From: Xue Zhou <85715413+xuezhou25@users.noreply.github.com> Date: Fri, 24 Sep 2021 17:06:16 +0000 Subject: [PATCH] fix gradle check fail due to renameing -min in #1094 (#1289) Signed-off-by: Xue Zhou --- .../InternalDistributionBwcSetupPlugin.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/buildSrc/src/main/java/org/opensearch/gradle/internal/InternalDistributionBwcSetupPlugin.java b/buildSrc/src/main/java/org/opensearch/gradle/internal/InternalDistributionBwcSetupPlugin.java index 8934ce03c0e..9e1211711ec 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/internal/InternalDistributionBwcSetupPlugin.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/internal/InternalDistributionBwcSetupPlugin.java @@ -239,10 +239,17 @@ public class InternalDistributionBwcSetupPlugin implements Plugin { DistributionProject(String name, String baseDir, Version version, String classifier, String extension, File checkoutDir) { this.name = name; this.projectPath = baseDir + "/" + name; - this.distFile = new File( - checkoutDir, - baseDir + "/" + name + "/build/distributions/opensearch-" + version + "-SNAPSHOT" + classifier + "." + extension - ); + if (version.onOrAfter("1.1.0")) { + this.distFile = new File( + checkoutDir, + baseDir + "/" + name + "/build/distributions/opensearch-min-" + version + "-SNAPSHOT" + classifier + "." + extension + ); + } else { + this.distFile = new File( + checkoutDir, + baseDir + "/" + name + "/build/distributions/opensearch-" + version + "-SNAPSHOT" + classifier + "." + extension + ); + } // we only ported this down to the 7.x branch. if (version.onOrAfter("7.10.0") && (name.endsWith("zip") || name.endsWith("tar"))) { this.expandedDistDir = new File(checkoutDir, baseDir + "/" + name + "/build/install");