Skip to content

Commit

Permalink
Merge pull request #471 from keymanapp/fix/debug/no-cdn
Browse files Browse the repository at this point in the history
fix: Skip CDN for --debug builds
  • Loading branch information
darcywong00 authored Sep 20, 2024
2 parents 687fe80 + 1addae6 commit 6f602b7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## START STANDARD SITE BUILD SCRIPT INCLUDE
readonly THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
readonly BOOTSTRAP="$(dirname "$THIS_SCRIPT")/resources/bootstrap.inc.sh"
readonly BOOTSTRAP_VERSION=v0.8
readonly BOOTSTRAP_VERSION=v0.10
[ -f "$BOOTSTRAP" ] && source "$BOOTSTRAP" || source <(curl -fs https://raw.githubusercontent.com/keymanapp/shared-sites/$BOOTSTRAP_VERSION/bootstrap.inc.sh)
## END STANDARD SITE BUILD SCRIPT INCLUDE

Expand Down Expand Up @@ -45,6 +45,6 @@ builder_run_action configure bootstrap_configure
builder_run_action clean clean_docker_container $KEYMAN_IMAGE_NAME $KEYMAN_CONTAINER_NAME
builder_run_action stop stop_docker_container $KEYMAN_IMAGE_NAME $KEYMAN_CONTAINER_NAME
builder_run_action build build_docker_container $KEYMAN_IMAGE_NAME $KEYMAN_CONTAINER_NAME
builder_run_action start start_docker_container $KEYMAN_IMAGE_NAME $KEYMAN_CONTAINER_NAME $KEYMAN_CONTAINER_DESC $HOST_KEYMAN_COM $PORT_KEYMAN_COM
builder_run_action start start_docker_container $KEYMAN_IMAGE_NAME $KEYMAN_CONTAINER_NAME $KEYMAN_CONTAINER_DESC $HOST_KEYMAN_COM $PORT_KEYMAN_COM $BUILDER_CONFIGURATION

builder_run_action test test_docker_container
14 changes: 9 additions & 5 deletions resources/init-container.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#!/usr/bin/env bash

echo "---- Generating CDN ---"
rm -rf cdn/deploy
cd cdn
php -d include_path=/var/www/html/_includes:. cdnrefresh.php
cd ..
if [[ ! $1 =~ "debug" ]]; then
echo "---- Generating CDN ---"
rm -rf cdn/deploy
cd cdn
php -d include_path=/var/www/html/_includes:. cdnrefresh.php
cd ..
else
echo "Skip Generating CDN"
fi

0 comments on commit 6f602b7

Please sign in to comment.