From 5159cb9ae1ea9c509c7429add6a8bb34a165f1ca Mon Sep 17 00:00:00 2001 From: Dmitry Maksyoma Date: Tue, 16 Feb 2021 22:21:48 +1300 Subject: [PATCH] build-tarball: only rebuild www if it was changed --- builder/build-tarball | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/builder/build-tarball b/builder/build-tarball index a070eaa..3cf9d2f 100755 --- a/builder/build-tarball +++ b/builder/build-tarball @@ -3,8 +3,13 @@ set -e build_www_dir() { - docker build -t kasmweb/www -f builder/dockerfile.www.build . - docker run --rm -v $PWD/builder/www:/build kasmweb/www:latest + local webpacked_www=$PWD/builder/www + local src_www=kasmweb + + if [ "$src_www" -nt "$webpacked_www" ]; then + docker build -t kasmweb/www -f builder/dockerfile.www.build . + docker run --rm -v $PWD/builder/www:/build kasmweb/www:latest + fi } shared_with_docker_dir=${GITLAB_SHARED_DIND_DIR:-/tmp}