Skip to content

Commit c89d797

Browse files
authored
makedist: Reset tar timestamps to the commit date (#13879)
This change should make the underlying `.tar` archive fully reproducible (given identical tool versions).
1 parent e7462bf commit c89d797

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/dev/makedist

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,9 @@ else
167167
fi
168168

169169
# Reset the modification and access times of all files to be packaged.
170-
echo "makedist: Resetting the modification and access times of package files."
171-
touch -c NEWS
170+
commitDate="$(git log -1 --format=%cI $treeish)"
171+
echo "makedist: Resetting the modification and access times of package files to $commitDate"
172+
touch -c -d"$commitDate" NEWS
172173
find . -exec touch -r NEWS -c {} \;
173174

174175
cd ..

0 commit comments

Comments
 (0)