Merge pull request #18556 from rjernst/package_versions

Build: Use dash for deb package version and underscore for rpm
This commit is contained in:
Ryan Ernst 2016-05-24 13:51:20 -07:00
commit 601334a13c
3 changed files with 4 additions and 12 deletions

View File

@ -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'

View File

@ -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'

View File

@ -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'