mirror of
https://github.com/uprightbass360/AzerothCore-RealmMaster.git
synced 2026-01-13 09:07:20 +00:00
fix: formatting
This commit is contained in:
22
deploy.sh
22
deploy.sh
@@ -117,10 +117,24 @@ resolve_project_name(){
|
|||||||
echo "$sanitized"
|
echo "$sanitized"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
filter_empty_lines(){
|
||||||
|
awk '
|
||||||
|
/^[[:space:]]*$/ {
|
||||||
|
empty_count++
|
||||||
|
if (empty_count <= 1) print
|
||||||
|
}
|
||||||
|
/[^[:space:]]/ {
|
||||||
|
empty_count = 0
|
||||||
|
print
|
||||||
|
}
|
||||||
|
'
|
||||||
|
}
|
||||||
|
|
||||||
compose(){
|
compose(){
|
||||||
local project_name
|
local project_name
|
||||||
project_name="$(resolve_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
|
# Build detection logic
|
||||||
@@ -231,7 +245,7 @@ prompt_build_if_needed(){
|
|||||||
|
|
||||||
if [ -t 0 ]; then
|
if [ -t 0 ]; then
|
||||||
local reply
|
local reply
|
||||||
read -r -p "Run './build.sh' now? [y/N]: " reply
|
read -r -p "Run build now? [y/N]: " reply
|
||||||
reply="${reply:-n}"
|
reply="${reply:-n}"
|
||||||
case "$reply" in
|
case "$reply" in
|
||||||
[Yy]*)
|
[Yy]*)
|
||||||
@@ -244,12 +258,12 @@ prompt_build_if_needed(){
|
|||||||
fi
|
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
|
return 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
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
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -701,6 +701,8 @@ elif [ -f "/tmp/scripts/manage-modules-sql.sh" ]; then
|
|||||||
. /tmp/scripts/manage-modules-sql.sh
|
. /tmp/scripts/manage-modules-sql.sh
|
||||||
else
|
else
|
||||||
echo "⚠️ SQL helper not found, skipping module SQL execution"
|
echo "⚠️ SQL helper not found, skipping module SQL execution"
|
||||||
|
echo "If you are seeing this during build this is normal"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Execute SQLs for enabled modules (via helper)
|
# Execute SQLs for enabled modules (via helper)
|
||||||
@@ -826,7 +828,7 @@ echo 'Module management complete.'
|
|||||||
|
|
||||||
if [ "$MODULES_LOCAL_RUN" = "1" ]; then
|
if [ "$MODULES_LOCAL_RUN" = "1" ]; then
|
||||||
# When running locally, use local-storage for build state tracking
|
# 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
|
if [ -n "$local_storage_path" ]; then
|
||||||
REBUILD_SENTINEL="$local_storage_path"
|
REBUILD_SENTINEL="$local_storage_path"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user