Check git state in Dockerfile to catch .dockerignore bugs
This commit is contained in:
Executable
+12
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user