diff mbox series

docker: *Actually* don't require rebuilding if unnecessary

Message ID 20190706202525.12707-1-stephen@that.guru
State Accepted
Headers show
Series docker: *Actually* don't require rebuilding if unnecessary | expand

Commit Message

Stephen Finucane July 6, 2019, 8:25 p.m. UTC
Because we were using 'set -e', we were erroring out as soon as
something - a diff in this case - failed. Temporarily disable it for
this one check.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Fixes: 0b5b4e8c ("docker: Don't require rebuilding if unnecessary")
Cc: Daniel Axtens <dja@axtens.net>
---
 tools/docker/entrypoint.sh | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Daniel Axtens Aug. 21, 2019, 7:36 a.m. UTC | #1
Stephen Finucane <stephen@that.guru> writes:

> Because we were using 'set -e', we were erroring out as soon as
> something - a diff in this case - failed. Temporarily disable it for
> this one check.
>
> Signed-off-by: Stephen Finucane <stephen@that.guru>
> Fixes: 0b5b4e8c ("docker: Don't require rebuilding if unnecessary")
> Cc: Daniel Axtens <dja@axtens.net>

Makes sense, applied.

Thanks,
Daniel
> ---
>  tools/docker/entrypoint.sh | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/tools/docker/entrypoint.sh b/tools/docker/entrypoint.sh
> index 32f7132a..d2b094bd 100755
> --- a/tools/docker/entrypoint.sh
> +++ b/tools/docker/entrypoint.sh
> @@ -67,6 +67,8 @@ EOF
>      exit 1
>  fi
>  
> +set +e
> +
>  # check if we need to rebuild because requirements changed
>  for x in /tmp/requirements-*.txt; do
>      if ! cmp $x ~/patchwork/$(basename $x); then
> @@ -81,6 +83,8 @@ EOF
>      fi
>  done
>  
> +set -e
> +
>  # check if db is connected
>  if ! test_db_connection; then
>      echo "The database seems not to be connected, or the patchwork user is broken"
> -- 
> 2.21.0
diff mbox series

Patch

diff --git a/tools/docker/entrypoint.sh b/tools/docker/entrypoint.sh
index 32f7132a..d2b094bd 100755
--- a/tools/docker/entrypoint.sh
+++ b/tools/docker/entrypoint.sh
@@ -67,6 +67,8 @@  EOF
     exit 1
 fi
 
+set +e
+
 # check if we need to rebuild because requirements changed
 for x in /tmp/requirements-*.txt; do
     if ! cmp $x ~/patchwork/$(basename $x); then
@@ -81,6 +83,8 @@  EOF
     fi
 done
 
+set -e
+
 # check if db is connected
 if ! test_db_connection; then
     echo "The database seems not to be connected, or the patchwork user is broken"