Skip to content

Commit b97c9dd

Browse files
committed
fix timestamps in the release zipball to make them deterministic
1 parent 076edf3 commit b97c9dd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ ifeq ($(shell if which faketime > /dev/null; then echo faketime; fi),faketime)
2424
export TZ=UTC
2525
TIMESTAMP := $(shell faketime -f "`git log -n1 --format=format:%ai`" \
2626
date -u '+%Y-%m-%d %H:%M:%S')
27+
TOUCH := touch -t $(shell faketime -f "`git log -n1 --format=format:%ai`" \
28+
date -u '+%Y%m%d%H%M.%S')
2729
# frozen time
2830
FAKETIME := faketime -f "$(TIMESTAMP)"
2931
# time moving at 5% of normal speed
@@ -60,7 +62,10 @@ release:
6062
cp ${LICENSE} ${RELEASE_DIR}
6163
printf "%s\n\n" ${CHANGE_LOG_HEADER} > ${README}
6264
git log --pretty=format:' * %s' ${SECOND_LATEST_TAG}..${LATEST_TAG} >> ${README}
63-
find ${RELEASE_DIR} | sort -u | zip -@9 ${RELEASE_DIR}.zip
65+
# fix the timestamp on the files to include in the zipball
66+
find ${RELEASE_DIR} | xargs $(TOUCH)
67+
ls -lR ${RELEASE_DIR}
68+
find ${RELEASE_DIR} | sort -u | $(FAKETIME) zip -@9 ${RELEASE_DIR}.zip
6469
rm -rf ${RELEASE_DIR}
6570

6671
clean:

0 commit comments

Comments
 (0)