Skip to content

Commit

Permalink
Make a clean checkout of the repo
Browse files Browse the repository at this point in the history
This means it isn't possible to reproducibly build a dirty repo but...
nobody wants to do that anyways. It does mean that the reproducible
build won't be affected by other files in the tree.
  • Loading branch information
Stebalien committed Jan 22, 2025
1 parent a2162e5 commit 2e0f0e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ WORKDIR /usr/src/builtin-actors
COPY ./rust-toolchain.toml .
RUN rustup show

COPY . .
# Then checkout a clean copy of the repo.
RUN --mount=type=bind,rw,target=/tmp/repo \
echo "Building $(git -C /tmp/repo rev-parse HEAD)" && \
git --git-dir /tmp/repo/.git --work-tree . checkout -f HEAD

ENTRYPOINT ["/bin/bash", "-c"]

0 comments on commit 2e0f0e4

Please sign in to comment.