Check git state in Dockerfile to catch .dockerignore bugs
This commit is contained in:
parent
e55d6c8d65
commit
a0994ac4b4
@ -33,6 +33,8 @@ RUN set -eux; \
|
|||||||
COPY ./ /opt/filecoin
|
COPY ./ /opt/filecoin
|
||||||
WORKDIR /opt/filecoin
|
WORKDIR /opt/filecoin
|
||||||
|
|
||||||
|
RUN scripts/docker-git-state-check.sh
|
||||||
|
|
||||||
### make configurable filecoin-ffi build
|
### make configurable filecoin-ffi build
|
||||||
ARG FFI_BUILD_FROM_SOURCE=0
|
ARG FFI_BUILD_FROM_SOURCE=0
|
||||||
ENV FFI_BUILD_FROM_SOURCE=${FFI_BUILD_FROM_SOURCE}
|
ENV FFI_BUILD_FROM_SOURCE=${FFI_BUILD_FROM_SOURCE}
|
||||||
|
12
scripts/docker-git-state-check.sh
Executable file
12
scripts/docker-git-state-check.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
set -e
|
||||||
|
|
||||||
|
if [ -z "$(git status --porcelain)" ]; then
|
||||||
|
echo "PASSED: Working directory clean"
|
||||||
|
else
|
||||||
|
echo "FAILED: Working directory not clean."
|
||||||
|
echo "This is likely because the .dockerignore file has removed something checked into git."
|
||||||
|
echo "Add the missing files listed below to the .dockerignore to fix this issue:"
|
||||||
|
echo "$(git status)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user