From 0cf61f9db9bd318716f1d271acca01ff6d93c398 Mon Sep 17 00:00:00 2001 From: Jesse McConnell Date: Fri, 21 Jun 2024 09:05:48 -0500 Subject: [PATCH] add config file support for jetty-website.cfg file --- jetty-website.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/jetty-website.sh b/jetty-website.sh index 0c2649e..46593d8 100755 --- a/jetty-website.sh +++ b/jetty-website.sh @@ -264,15 +264,18 @@ function set_environment() { set_log_file; } - function set_global_variables() { ## - ## Update these settings accordingly + ## Update these settings accordingly, read from cfg file if exists ## - SUDO_USER=www-data - STAGE_DIR=$(pwd)/target/stage; - RELEASE_DIR=$(pwd)/target/release; - COMPRESS_EXTENSIONS=("*.woff" "*.woff2" "*.js" "*.css" "*.svg"); + if [[ -e jetty-website.cfg ]]; then + source ./jetty-website.cfg + else + SUDO_USER=www-data + STAGE_DIR=$(pwd)/target/stage; + RELEASE_DIR=$(pwd)/target/release; + COMPRESS_EXTENSIONS=("*.woff" "*.woff2" "*.js" "*.css" "*.svg"); + fi export CI=true MIN_JAVA_VERSION=17