mirror of
https://github.com/uprightbass360/AzerothCore-RealmMaster.git
synced 2026-01-13 00:58:34 +00:00
fix: formatting
This commit is contained in:
22
deploy.sh
22
deploy.sh
@@ -117,10 +117,24 @@ resolve_project_name(){
|
||||
echo "$sanitized"
|
||||
}
|
||||
|
||||
filter_empty_lines(){
|
||||
awk '
|
||||
/^[[:space:]]*$/ {
|
||||
empty_count++
|
||||
if (empty_count <= 1) print
|
||||
}
|
||||
/[^[:space:]]/ {
|
||||
empty_count = 0
|
||||
print
|
||||
}
|
||||
'
|
||||
}
|
||||
|
||||
compose(){
|
||||
local project_name
|
||||
project_name="$(resolve_project_name)"
|
||||
docker compose --project-name "$project_name" -f "$COMPOSE_FILE" "$@"
|
||||
# Add --quiet for less verbose output, filter excessive empty lines
|
||||
docker compose --project-name "$project_name" -f "$COMPOSE_FILE" "$@" | filter_empty_lines
|
||||
}
|
||||
|
||||
# Build detection logic
|
||||
@@ -231,7 +245,7 @@ prompt_build_if_needed(){
|
||||
|
||||
if [ -t 0 ]; then
|
||||
local reply
|
||||
read -r -p "Run './build.sh' now? [y/N]: " reply
|
||||
read -r -p "Run build now? [y/N]: " reply
|
||||
reply="${reply:-n}"
|
||||
case "$reply" in
|
||||
[Yy]*)
|
||||
@@ -244,12 +258,12 @@ prompt_build_if_needed(){
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
err "Build required but declined. Run './build.sh' manually before deploying."
|
||||
err "Build required but declined. Run './build.sh' manually before deploying or re-run this script."
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
else
|
||||
err "Build required but running non-interactively. Run './build.sh' first."
|
||||
err "Build required but running non-interactively. Run './build.sh' manually before deploying or re-run this script."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -701,6 +701,8 @@ elif [ -f "/tmp/scripts/manage-modules-sql.sh" ]; then
|
||||
. /tmp/scripts/manage-modules-sql.sh
|
||||
else
|
||||
echo "⚠️ SQL helper not found, skipping module SQL execution"
|
||||
echo "If you are seeing this during build this is normal"
|
||||
|
||||
fi
|
||||
|
||||
# Execute SQLs for enabled modules (via helper)
|
||||
@@ -826,7 +828,7 @@ echo 'Module management complete.'
|
||||
|
||||
if [ "$MODULES_LOCAL_RUN" = "1" ]; then
|
||||
# When running locally, use local-storage for build state tracking
|
||||
local local_storage_path="${LOCAL_STORAGE_SENTINEL_PATH:-}"
|
||||
local_storage_path="${LOCAL_STORAGE_SENTINEL_PATH:-}"
|
||||
if [ -n "$local_storage_path" ]; then
|
||||
REBUILD_SENTINEL="$local_storage_path"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user