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

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>

Co-authored-by: Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
This commit is contained in:
Abbas Hussain 2021-05-21 11:03:36 +05:30 committed by GitHub
parent ad3ece85aa
commit 935001e16a
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}")) }
}