]> git.lizzy.rs Git - rust.git/commitdiff
Ignore files copied from previous stage when generating hash.
authorHans Kratz <hans@appfour.com>
Mon, 1 Nov 2021 17:32:24 +0000 (18:32 +0100)
committerHans Kratz <hans@appfour.com>
Mon, 1 Nov 2021 18:20:07 +0000 (19:20 +0100)
src/ci/docker/run.sh

index b1dacf79d269598d593a3429f567c49b471e549c..93b4f435d4db777c66e38c1b8a5bf160dd4e2c28 100755 (executable)
@@ -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