Skip to content

Commit b52bca2

Browse files
author
mxve
committed
make iwd's reproducible
1 parent 96a8099 commit b52bca2

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

scripts/release.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ cp $work_dir/zone_out/*/*.ff $work_dir/release/zone/patch/
2222
# zip iwd_files
2323
for iwd in "${iwd_files[@]}"; do
2424
pushd $work_dir/release/iw4x/$iwd
25-
zip -r $iwd.zip *
25+
# Set consistent timestamps for all files
26+
find . -exec touch -t 200001010000.00 {} +
27+
# Sort files for zipping, -X for deterministic zip
28+
find . -name '*' -print0 | LC_ALL=C sort -z | xargs -0 zip -X $iwd.zip
2629
mv $iwd.zip $work_dir/release/iw4x/$iwd.iwd
2730
popd
2831
rm -r $work_dir/release/iw4x/$iwd
@@ -37,7 +40,7 @@ popd
3740

3841
# create release.zip from release dir
3942
pushd $work_dir/release/
40-
zip -r release.zip *
43+
zip -r -X release.zip *
4144
mv release.zip $work_dir
4245
popd
4346

0 commit comments

Comments
 (0)