about summary refs log tree commit diff
diff options
context:
space:
mode:
authorHans Kratz <hans@appfour.com>2021-11-01 18:32:24 +0100
committerHans Kratz <hans@appfour.com>2021-11-01 19:20:07 +0100
commitaef51a0697b6906b0545b323426db05d189049fc (patch)
tree9c4f09ce1b13f1ad91a5346a843789bce727244f
parent3a687e7510b9f4c716f3ad7cc3a86492979a266d (diff)
downloadrust-aef51a0697b6906b0545b323426db05d189049fc.tar.gz
rust-aef51a0697b6906b0545b323426db05d189049fc.zip
Ignore files copied from previous stage when generating hash.
-rwxr-xr-xsrc/ci/docker/run.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ci/docker/run.sh b/src/ci/docker/run.sh
index b1dacf79d26..93b4f435d4d 100755
--- a/src/ci/docker/run.sh
+++ b/src/ci/docker/run.sh
@@ -50,7 +50,8 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
       # Look for all source files involves in the COPY command
       copied_files=/tmp/.docker-copied-files.txt
       rm -f "$copied_files"
-      for i in $(sed -n -e 's/^COPY \(.*\) .*$/\1/p' "$docker_dir/$image/Dockerfile"); do
+      for i in $(sed -n -e '/^COPY --from=/! s/^COPY \(.*\) .*$/\1/p' \
+          "$docker_dir/$image/Dockerfile"); do
         # List the file names
         find "$script_dir/$i" -type f >> $copied_files
       done