distribution/packages: Fix filename format for deb archives (#621)

Debian packages are formatted with the following filename structure:

name_[epoch:]version-release_arch.deb

Make generated Debian packages follow this convention.

Signed-off-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
Neal Gompa (ニール・ゴンパ) 2021-05-13 18:14:02 -04:00 committed by GitHub
parent 943c778a7f
commit 4d88210c12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -134,9 +134,9 @@ Closure commonPackageConfig(String type, boolean jdk, String architecture) {
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
// Deb convention uses a '-' for final separator before architecture, rpm uses a '.'
// 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}")) }
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}")) }
}