Skip to content

Commit

Permalink
stable filemode for zip distributions
Browse files Browse the repository at this point in the history
Applies default file and directory permissions to zip distributions
similar to how they're set for the tar distributions. Previously zip
distributions would retain permissions they had on the build host's
working tree, which could vary depending on its umask

For elastic#30799
  • Loading branch information
andyb-elastic committed May 25, 2018
1 parent 5a97423 commit 4247d38
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions distribution/archives/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,23 @@ tasks.withType(AbstractArchiveTask) {
baseName = "elasticsearch${ subdir.contains('oss') ? '-oss' : ''}"
}

Closure commonZipConfig = {
dirMode 0755
fileMode 0644
}

task buildIntegTestZip(type: Zip) {
configure(commonZipConfig)
with archiveFiles(transportModulesFiles, 'zip', false)
}

task buildZip(type: Zip) {
configure(commonZipConfig)
with archiveFiles(modulesFiles(false), 'zip', false)
}

task buildOssZip(type: Zip) {
configure(commonZipConfig)
with archiveFiles(modulesFiles(true), 'zip', true)
}

Expand Down

0 comments on commit 4247d38

Please sign in to comment.