[PATCH 11/11] docker: Don't require rebuilding if unnecessary

Stephen Finucane stephen at that.guru
Mon Jun 25 05:55:57 AEST 2018


Now that we're pinning versions, we're going to see more frequent
dependency version changes. Requiring a rebuild after every one of these
is tiresome so don't force it and instead display a helpful message
merely suggesting that a rebuild may be necessary.

Signed-off-by: Stephen Finucane <stephen at that.guru>
Cc: Daniel Axtens <dja at axtens.net>
---
This is a modified version of an earlier patch I submitted to the list.
The original was rejected as there were concerns that it would lead to
some confusion. However, I think the warning it prints is explicit
enough that someone can make their own mind up about this.
---
 tools/docker/entrypoint.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/docker/entrypoint.sh b/tools/docker/entrypoint.sh
index 997b8763..afa85333 100755
--- a/tools/docker/entrypoint.sh
+++ b/tools/docker/entrypoint.sh
@@ -69,9 +69,10 @@ fi
 for x in /tmp/requirements-*.txt; do
     if ! cmp $x ~/patchwork/$(basename $x); then
         echo "A requirements file has changed."
-        echo "Please rebuild the patchwork image:"
+        echo "You may need to rebuild the patchwork image:"
         echo "    docker-compose build web"
-        exit 1
+        echo ""
+        diff -u $x ~/patchwork/$(basename $x)
     fi
 done
 
-- 
2.17.1



More information about the Patchwork mailing list