Add a tar.gz distribution file as well as the zip one

This commit is contained in:
kimchy 2010-11-06 01:28:10 +02:00
parent 87efccf677
commit 9bddd6770c
1 changed files with 23 additions and 4 deletions

View File

@ -104,21 +104,40 @@ task explodedDist(dependsOn: [configurations.distLib], description: 'Builds a mi
} }
task zip(type: Zip, dependsOn: ['explodedDist']) { task zip(type: Zip, dependsOn: ['explodedDist']) {
zipRootFolder = "$archivesBaseName-${-> version}" rootFolder = "$archivesBaseName-${-> version}"
from(explodedDistDir) { from(explodedDistDir) {
into zipRootFolder into rootFolder
exclude 'bin/elasticsearch' exclude 'bin/elasticsearch'
exclude 'bin/plugin' exclude 'bin/plugin'
} }
from(explodedDistDir) { from(explodedDistDir) {
into zipRootFolder into rootFolder
include 'bin/elasticsearch' include 'bin/elasticsearch'
include 'bin/plugin' include 'bin/plugin'
fileMode = 0755 fileMode = 0755
} }
} }
task release(dependsOn: [zip]) << { task tar(type: Tar, dependsOn: ['explodedDist']) {
compression = Compression.GZIP
extension = "tar.gz"
rootFolder = "$archivesBaseName-${-> version}"
from(explodedDistDir) {
into rootFolder
exclude 'bin/*.bat'
exclude 'bin/elasticsearch'
exclude 'bin/plugin'
exclude 'lib/sigar/*win*'
}
from(explodedDistDir) {
into rootFolder
include 'bin/elasticsearch'
include 'bin/plugin'
fileMode = 0755
}
}
task release(dependsOn: [zip, tar]) << {
ant.delete(dir: explodedDistDir) ant.delete(dir: explodedDistDir)
} }