diff --git a/distribution/build.gradle b/distribution/build.gradle index 0df2f24fef0..12bb17b807f 100644 --- a/distribution/build.gradle +++ b/distribution/build.gradle @@ -302,10 +302,6 @@ configure(subprojects.findAll { ['deb', 'rpm'].contains(it.name) }) { '''.stripIndent().replace('\n', ' ').trim() url 'https://www.elastic.co/' - /* The version of the package can't contain -SNAPSHOT so we rip it off if - we see it. We'll add it back on to the file name though. */ - version project.version.replace('-SNAPSHOT', '') - // signing setup if (project.hasProperty('signing.password') && System.getProperty('build.snapshot', 'true') == 'false') { signingKeyId = project.hasProperty('signing.keyId') ? project.property('signing.keyId') : 'D88E42B4' diff --git a/distribution/deb/build.gradle b/distribution/deb/build.gradle index a3d42a2c042..89d33597888 100644 --- a/distribution/deb/build.gradle +++ b/distribution/deb/build.gradle @@ -22,6 +22,8 @@ task buildDeb(type: Deb) { baseName 'elasticsearch' // this is what pom generation uses for artifactId // Follow elasticsearch's deb file naming convention archiveName "${packageName}-${project.version}.deb" + version = project.version + packageGroup 'web' requires 'libc6' requires 'adduser' diff --git a/distribution/rpm/build.gradle b/distribution/rpm/build.gradle index 72ed58e52c3..185f558ff02 100644 --- a/distribution/rpm/build.gradle +++ b/distribution/rpm/build.gradle @@ -25,14 +25,8 @@ task buildRpm(type: Rpm) { packageGroup 'Application/Internet' prefix '/usr' packager 'Elasticsearch' - if (version.contains('~')) { - def tokenized = version.tokenize('~') - version tokenized[0] - release tokenized[1] - } else { - version version - release '1' - } + version = project.version.replace('-', '_') + release = '1' arch 'NOARCH' os 'LINUX' license '2009'