Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test how build files change between rebuilds #1959

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions packages/playground/wordpress-builds/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,12 @@ RUN find wordpress-static -type f | sed 's#^wordpress-static/##'> wordpress-remo
RUN cp wordpress-remote-asset-paths wordpress-static/

# ZIP the static files
# WIP This is a proof of concept that we can make zips deterministic
# and with that ensure rebuilds of the same code produce the same result
# TODO: review zip flags, find a better source of the timestamp
RUN cd wordpress-static/ && \
zip -r ../wordpress-static.zip . && \
find . -exec touch -t $(date +%Y%m%d0000) {} \; && \
zip -rq -D -X -9 -A --compression-method deflate ../wordpress-static.zip . && \
cd ..

# Move ZIP to the public output directory
Expand Down Expand Up @@ -146,4 +150,5 @@ RUN mv wordpress /wordpress && \
cp wordpress-remote-asset-paths /wordpress/ && \
cp wordpress-static.zip /wordpress/ && \
cd /wordpress && \
zip /root/output/$OUT_FILENAME.zip -r .
find . -exec touch -t $(date +%Y%m%d0000) {} \; && \
zip -rq -D -X -9 -A --compression-method deflate /root/output/$OUT_FILENAME.zip -r .
Loading
Loading