From 9ce9df51ed9e936a02bc89f5480be001ef26a61a Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Fri, 20 Sep 2024 10:12:14 +0700 Subject: [PATCH 1/2] fix: Skip CDN for --debug builds --- build.sh | 2 +- resources/init-container.sh | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/build.sh b/build.sh index 526fae3f7..a5937e8ec 100755 --- a/build.sh +++ b/build.sh @@ -46,6 +46,6 @@ builder_run_action configure bootstrap_configure builder_run_action clean clean_docker_container $HELP_IMAGE_NAME $HELP_CONTAINER_NAME builder_run_action stop stop_docker_container $HELP_IMAGE_NAME $HELP_CONTAINER_NAME builder_run_action build build_docker_container $HELP_IMAGE_NAME $HELP_CONTAINER_NAME -builder_run_action start start_docker_container $HELP_IMAGE_NAME $HELP_CONTAINER_NAME $HELP_CONTAINER_DESC $HOST_HELP_KEYMAN_COM $PORT_HELP_KEYMAN_COM +builder_run_action start start_docker_container $HELP_IMAGE_NAME $HELP_CONTAINER_NAME $HELP_CONTAINER_DESC $HOST_HELP_KEYMAN_COM $PORT_HELP_KEYMAN_COM $BUILDER_CONFIGURATION builder_run_action test test_docker_container diff --git a/resources/init-container.sh b/resources/init-container.sh index c89792c47..8c7ec8408 100755 --- a/resources/init-container.sh +++ b/resources/init-container.sh @@ -5,7 +5,11 @@ rm -f keyboard/index.cache cd keyboard php -d include_path=/var/www/html/_includes:. _build_cache.php -echo "---- Generating CDN ---" -cd ../cdn -php -d include_path=/var/www/html/_includes:. cdnrefresh.php -cd .. +if [[ ! $1 =~ "debug" ]]; then + echo "---- Generating CDN ---" + cd ../cdn + php -d include_path=/var/www/html/_includes:. cdnrefresh.php + cd .. +else + echo "Skip Generating CDN" +fi From 5a99378654b42bc88ccc4cc3dbc889cdc409da7b Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Fri, 27 Sep 2024 07:52:55 +0700 Subject: [PATCH 2/2] Update resources/init-container.sh Co-authored-by: Marc Durdin --- resources/init-container.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/init-container.sh b/resources/init-container.sh index 8c7ec8408..5229ed508 100755 --- a/resources/init-container.sh +++ b/resources/init-container.sh @@ -11,5 +11,6 @@ if [[ ! $1 =~ "debug" ]]; then php -d include_path=/var/www/html/_includes:. cdnrefresh.php cd .. else - echo "Skip Generating CDN" + echo "Skip Generating CDN and clean CDN cache" + rm -rf ../cdn/deploy fi