refactor and compress code

This commit is contained in:
uprightbass360
2025-12-02 21:43:05 -05:00
parent 4596320856
commit 3b11e23546
19 changed files with 2181 additions and 200 deletions

View File

@@ -12,6 +12,13 @@ ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DEFAULT_COMPOSE_FILE="$ROOT_DIR/docker-compose.yml"
ENV_PATH="$ROOT_DIR/.env"
TEMPLATE_PATH="$ROOT_DIR/.env.template"
# Source common library with proper error handling
if ! source "$ROOT_DIR/scripts/bash/lib/common.sh" 2>/dev/null; then
echo "❌ FATAL: Cannot load $ROOT_DIR/scripts/bash/lib/common.sh" >&2
echo "This library is required for deploy.sh to function." >&2
exit 1
fi
source "$ROOT_DIR/scripts/bash/project_name.sh"
# Default project name (read from .env or template)
@@ -46,11 +53,7 @@ MODULE_STATE_INITIALIZED=0
declare -a MODULES_COMPILE_LIST=()
declare -a COMPOSE_FILE_ARGS=()
BLUE='\033[0;34m'; GREEN='\033[0;32m'; YELLOW='\033[1;33m'; RED='\033[0;31m'; NC='\033[0m'
info(){ printf '%b\n' "${BLUE} $*${NC}"; }
ok(){ printf '%b\n' "${GREEN}$*${NC}"; }
warn(){ printf '%b\n' "${YELLOW}⚠️ $*${NC}"; }
err(){ printf '%b\n' "${RED}$*${NC}"; }
# Color definitions and logging functions now provided by lib/common.sh
show_deployment_header(){
printf '\n%b\n' "${BLUE}⚔️ AZEROTHCORE REALM DEPLOYMENT ⚔️${NC}"