From b8f9469cc995fc3e4c5ff0171ee71348924a249f Mon Sep 17 00:00:00 2001 From: "Tom \"spot\" Callaway" <72474383+spotaws@users.noreply.github.com> Date: Wed, 21 Apr 2021 14:45:53 -0400 Subject: [PATCH] clean up rpm artifact naming (#590) Signed-off-by: Tom spot Callaway --- distribution/packages/build.gradle | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/distribution/packages/build.gradle b/distribution/packages/build.gradle index bc024409fd5..25c2de2a1fe 100644 --- a/distribution/packages/build.gradle +++ b/distribution/packages/build.gradle @@ -129,12 +129,17 @@ Closure commonPackageConfig(String type, boolean jdk, String architecture) { } } // Follow opensearch's file naming convention - String jdkString = jdk ? "" : "no-jdk-" + String jdkString = jdk ? "" : "-no-jdk" String prefix = "${architecture == 'aarch64' ? 'aarch64-' : ''}${jdk ? '' : 'no-jdk-'}${type}" destinationDirectory = file("${prefix}/build/distributions") // SystemPackagingTask overrides default archive task convention mappings, but doesn't provide a setter so we have to override the convention mapping itself - conventionMapping.archiveFile = { objects.fileProperty().fileValue(file("${destinationDirectory.get()}/${packageName}-${project.version}-${jdkString}${archString}.${type}")) } + // Deb convention uses a '-' for final separator before architecture, rpm uses a '.' + if (type == 'deb') { + conventionMapping.archiveFile = { objects.fileProperty().fileValue(file("${destinationDirectory.get()}/${packageName}-${project.version}${jdkString}-${archString}.${type}")) } + } else { + conventionMapping.archiveFile = { objects.fileProperty().fileValue(file("${destinationDirectory.get()}/${packageName}-${project.version}${jdkString}.${archString}.${type}")) } + } String packagingFiles = "build/packaging/${jdk ? '' : 'no-jdk-'}${type}"