Skip to content

Commit 4247d38

Browse files
committed
stable filemode for zip distributions
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
1 parent 5a97423 commit 4247d38

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

distribution/archives/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,23 @@ tasks.withType(AbstractArchiveTask) {
104104
baseName = "elasticsearch${ subdir.contains('oss') ? '-oss' : ''}"
105105
}
106106

107+
Closure commonZipConfig = {
108+
dirMode 0755
109+
fileMode 0644
110+
}
111+
107112
task buildIntegTestZip(type: Zip) {
113+
configure(commonZipConfig)
108114
with archiveFiles(transportModulesFiles, 'zip', false)
109115
}
110116

111117
task buildZip(type: Zip) {
118+
configure(commonZipConfig)
112119
with archiveFiles(modulesFiles(false), 'zip', false)
113120
}
114121

115122
task buildOssZip(type: Zip) {
123+
configure(commonZipConfig)
116124
with archiveFiles(modulesFiles(true), 'zip', true)
117125
}
118126

0 commit comments

Comments
 (0)