mirror of
https://github.com/uprightbass360/AzerothCore-RealmMaster.git
synced 2026-01-13 00:58:34 +00:00
Merge pull request #5 from uprightbass360/feature/module-rebuild-fix
Feature/module rebuild fix
This commit is contained in:
28
deploy.sh
28
deploy.sh
@@ -16,6 +16,7 @@ WATCH_LOGS=1
|
||||
KEEP_RUNNING=0
|
||||
SKIP_REBUILD=0
|
||||
WORLD_LOG_SINCE=""
|
||||
ASSUME_YES=0
|
||||
|
||||
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}"; }
|
||||
@@ -49,6 +50,7 @@ Options:
|
||||
--no-watch Do not tail worldserver logs after staging
|
||||
--keep-running Do not pre-stop runtime stack before rebuild
|
||||
--skip-rebuild Skip source rebuild even if modules require it
|
||||
--yes, -y Auto-confirm the deployment prompt
|
||||
-h, --help Show this help
|
||||
|
||||
This command automates the module workflow (sync modules, rebuild source if needed,
|
||||
@@ -62,6 +64,7 @@ while [[ $# -gt 0 ]]; do
|
||||
--no-watch) WATCH_LOGS=0; shift;;
|
||||
--keep-running) KEEP_RUNNING=1; shift;;
|
||||
--skip-rebuild) SKIP_REBUILD=1; shift;;
|
||||
--yes|-y) ASSUME_YES=1; shift;;
|
||||
-h|--help) usage; exit 0;;
|
||||
*) err "Unknown option: $1"; usage; exit 1;;
|
||||
esac
|
||||
@@ -106,8 +109,15 @@ compose(){
|
||||
}
|
||||
|
||||
ensure_source_repo(){
|
||||
local module_playerbots
|
||||
module_playerbots="$(read_env MODULE_PLAYERBOTS "0")"
|
||||
local default_source="./source/azerothcore"
|
||||
if [ "$module_playerbots" = "1" ]; then
|
||||
default_source="./source/azerothcore-playerbots"
|
||||
fi
|
||||
|
||||
local src_path
|
||||
src_path="$(read_env MODULES_REBUILD_SOURCE_PATH "./source/azerothcore")"
|
||||
src_path="$(read_env MODULES_REBUILD_SOURCE_PATH "$default_source")"
|
||||
if [[ "$src_path" != /* ]]; then
|
||||
src_path="$ROOT_DIR/$src_path"
|
||||
fi
|
||||
@@ -348,6 +358,22 @@ wait_for_worldserver_ready(){
|
||||
}
|
||||
|
||||
main(){
|
||||
if [ "$ASSUME_YES" -ne 1 ]; then
|
||||
if [ -t 0 ]; then
|
||||
read -r -p "Proceed with AzerothCore deployment? [y/N]: " reply
|
||||
reply="${reply:-n}"
|
||||
else
|
||||
warn "No --yes flag provided and standard input is not interactive; aborting deployment."
|
||||
exit 1
|
||||
fi
|
||||
case "$reply" in
|
||||
[Yy]*) info "Deployment confirmed."; ;;
|
||||
*) err "Deployment cancelled."; exit 1 ;;
|
||||
esac
|
||||
else
|
||||
info "Auto-confirming deployment (--yes supplied)."
|
||||
fi
|
||||
|
||||
show_deployment_header
|
||||
|
||||
local src_dir
|
||||
|
||||
@@ -228,8 +228,9 @@ execute_module_sql_scripts() {
|
||||
execute_module_sql "mod-TimeIsTime" "Time Is Time"
|
||||
fi
|
||||
|
||||
if [ "$MODULE_POCKET_PORTAL" = "1" ] && [ -d "mod-pocket-portal" ]; then
|
||||
execute_module_sql "mod-pocket-portal" "Pocket Portal"
|
||||
if [ "$MODULE_POCKET_PORTAL" = "1" ]; then
|
||||
echo '⚠️ Skipping mod-pocket-portal SQL: module disabled until C++20 patch is applied.'
|
||||
MODULE_POCKET_PORTAL=0
|
||||
fi
|
||||
|
||||
if [ "$MODULE_RANDOM_ENCHANTS" = "1" ] && [ -d "mod-random-enchants" ]; then
|
||||
|
||||
@@ -117,6 +117,12 @@ if [ "$MODULE_TIME_IS_TIME" != "1" ] && [ -d "mod-TimeIsTime" ]; then
|
||||
rm -rf mod-TimeIsTime
|
||||
fi
|
||||
|
||||
if [ "$MODULE_POCKET_PORTAL" = "1" ]; then
|
||||
echo '⚠️ mod-pocket-portal is temporarily disabled (requires C++20 <format>). Skipping until patched.'
|
||||
echo ' Apply the std::format -> SendSystemMessage fix before re-enabling this module.'
|
||||
MODULE_POCKET_PORTAL=0
|
||||
fi
|
||||
|
||||
if [ "$MODULE_POCKET_PORTAL" != "1" ] && [ -d "mod-pocket-portal" ]; then
|
||||
echo 'Removing mod-pocket-portal (disabled)...'
|
||||
rm -rf mod-pocket-portal
|
||||
@@ -224,13 +230,12 @@ echo 'Installing enabled modules...'
|
||||
# Install Playerbots if enabled
|
||||
if [ "$MODULE_PLAYERBOTS" = "1" ] && [ ! -d "mod-playerbots" ]; then
|
||||
echo '🤖 Installing mod-playerbots...'
|
||||
echo ' 📖 Project: https://github.com/liyunfan1223/mod-playerbots'
|
||||
echo ' 🚨 CRITICAL: REQUIRES Custom AzerothCore branch (liyunfan1223/azerothcore-wotlk/tree/Playerbot)'
|
||||
echo ' 📖 Project: https://github.com/uprightbass360/mod-playerbots'
|
||||
echo ' 🚨 CRITICAL: REQUIRES Custom AzerothCore branch (uprightbass360/azerothcore-wotlk-playerbots/tree/Playerbot)'
|
||||
echo ' 🚨 INCOMPATIBLE with standard AzerothCore - module will not function properly'
|
||||
echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation'
|
||||
echo ' 📋 POST-INSTALL: Requires manual account/character configuration'
|
||||
echo ' 🔬 STATUS: IN TESTING - Currently under verification'
|
||||
git clone https://github.com/liyunfan1223/mod-playerbots.git mod-playerbots
|
||||
git clone https://github.com/uprightbass360/mod-playerbots.git mod-playerbots
|
||||
fi
|
||||
|
||||
# Install AOE Loot if enabled
|
||||
@@ -239,7 +244,6 @@ if [ "$MODULE_AOE_LOOT" = "1" ] && [ ! -d "mod-aoe-loot" ]; then
|
||||
echo ' 📖 Project: https://github.com/azerothcore/mod-aoe-loot'
|
||||
echo ' ℹ️ Allows looting multiple corpses with one action'
|
||||
echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation'
|
||||
echo ' 🔬 STATUS: IN TESTING - Currently under verification'
|
||||
git clone https://github.com/azerothcore/mod-aoe-loot.git mod-aoe-loot
|
||||
fi
|
||||
|
||||
@@ -249,7 +253,6 @@ if [ "$MODULE_LEARN_SPELLS" = "1" ] && [ ! -d "mod-learn-spells" ]; then
|
||||
echo ' 📖 Project: https://github.com/azerothcore/mod-learn-spells'
|
||||
echo ' ℹ️ Automatically teaches class spells on level up'
|
||||
echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation'
|
||||
echo ' 🔬 STATUS: IN TESTING - Currently under verification'
|
||||
git clone https://github.com/azerothcore/mod-learn-spells.git mod-learn-spells
|
||||
fi
|
||||
|
||||
@@ -259,7 +262,6 @@ if [ "$MODULE_FIREWORKS" = "1" ] && [ ! -d "mod-fireworks-on-level" ]; then
|
||||
echo ' 📖 Project: https://github.com/azerothcore/mod-fireworks-on-level'
|
||||
echo ' ℹ️ Displays fireworks when players level up'
|
||||
echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation'
|
||||
echo ' 🔬 STATUS: IN TESTING - Currently under verification'
|
||||
git clone https://github.com/azerothcore/mod-fireworks-on-level.git mod-fireworks-on-level
|
||||
fi
|
||||
|
||||
@@ -271,7 +273,6 @@ if [ "$MODULE_INDIVIDUAL_PROGRESSION" = "1" ] && [ ! -d "mod-individual-progress
|
||||
echo ' ✅ AUTO-CONFIG: Automatically sets EnablePlayerSettings=1 and DBC.EnforceItemAttributes=0'
|
||||
echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation'
|
||||
echo ' 📁 Optional client files available in optional/ directory'
|
||||
echo ' 🔬 STATUS: IN TESTING - Currently under verification'
|
||||
git clone https://github.com/ZhengPeiRu21/mod-individual-progression.git mod-individual-progression
|
||||
fi
|
||||
|
||||
@@ -298,7 +299,6 @@ if [ "$MODULE_TRANSMOG" = "1" ] && [ ! -d "mod-transmog" ]; then
|
||||
echo ' 📖 Project: https://github.com/azerothcore/mod-transmog'
|
||||
echo ' ℹ️ Allows appearance customization of equipment'
|
||||
echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation'
|
||||
echo ' 🔬 STATUS: IN TESTING - Currently under verification'
|
||||
git clone https://github.com/azerothcore/mod-transmog.git mod-transmog
|
||||
fi
|
||||
|
||||
@@ -319,7 +319,6 @@ if [ "$MODULE_SOLO_LFG" = "1" ] && [ ! -d "mod-solo-lfg" ]; then
|
||||
echo ' ℹ️ Allows dungeon finder for solo players and small groups'
|
||||
echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation'
|
||||
echo ' 💡 Pairs perfectly with mod-solocraft and mod-autobalance'
|
||||
echo ' 🔬 STATUS: IN TESTING - Currently under verification'
|
||||
git clone https://github.com/azerothcore/mod-solo-lfg.git mod-solo-lfg
|
||||
fi
|
||||
|
||||
@@ -369,7 +368,6 @@ if [ "$MODULE_ELUNA" = "1" ] && [ ! -d "mod-eluna" ]; then
|
||||
echo ' 📖 Project: https://github.com/azerothcore/mod-eluna'
|
||||
echo ' ℹ️ Lua scripting engine for custom server functionality'
|
||||
echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation'
|
||||
echo ' 🔬 STATUS: IN TESTING - Currently under verification'
|
||||
git clone https://github.com/azerothcore/mod-eluna.git mod-eluna
|
||||
fi
|
||||
if [ "$MODULE_ARAC" = "1" ] && [ ! -d "mod-arac" ]; then
|
||||
@@ -378,7 +376,6 @@ if [ "$MODULE_ARAC" = "1" ] && [ ! -d "mod-arac" ]; then
|
||||
echo ' ℹ️ All Races All Classes - Removes class restrictions'
|
||||
echo ' 🚨 CRITICAL: Requires DBC file updates and client patch!'
|
||||
echo ' 📋 POST-INSTALL: Apply Patch-A.MPQ to client WoW/Data/ directory'
|
||||
echo ' 🔬 STATUS: IN TESTING - Currently under verification'
|
||||
git clone https://github.com/heyitsbench/mod-arac.git mod-arac
|
||||
fi
|
||||
|
||||
@@ -387,11 +384,6 @@ if [ "$MODULE_TIME_IS_TIME" = "1" ] && [ ! -d "mod-TimeIsTime" ]; then
|
||||
git clone https://github.com/dunjeon/mod-TimeIsTime.git mod-TimeIsTime
|
||||
fi
|
||||
|
||||
if [ "$MODULE_POCKET_PORTAL" = "1" ] && [ ! -d "mod-pocket-portal" ]; then
|
||||
echo 'Installing mod-pocket-portal...'
|
||||
git clone https://github.com/azerothcore/mod-pocket-portal.git mod-pocket-portal
|
||||
fi
|
||||
|
||||
if [ "$MODULE_RANDOM_ENCHANTS" = "1" ] && [ ! -d "mod-random-enchants" ]; then
|
||||
echo 'Installing mod-random-enchants...'
|
||||
git clone https://github.com/azerothcore/mod-random-enchants.git mod-random-enchants
|
||||
@@ -421,7 +413,6 @@ if [ "$MODULE_NPC_ENCHANTER" = "1" ] && [ ! -d "mod-npc-enchanter" ]; then
|
||||
echo ' 📖 Project: https://github.com/azerothcore/mod-npc-enchanter'
|
||||
echo ' ℹ️ NPC that provides enchanting services'
|
||||
echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation'
|
||||
echo ' 🔬 STATUS: IN TESTING - Currently under verification'
|
||||
git clone https://github.com/azerothcore/mod-npc-enchanter.git mod-npc-enchanter
|
||||
fi
|
||||
|
||||
@@ -439,7 +430,6 @@ if [ "$MODULE_ASSISTANT" = "1" ] && [ ! -d "mod-assistant" ]; then
|
||||
echo ' 📖 Project: https://github.com/noisiver/mod-assistant'
|
||||
echo ' ℹ️ NPC (ID: 9000000) providing heirlooms, glyphs, gems, profession services'
|
||||
echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation'
|
||||
echo ' 🔬 STATUS: IN TESTING - Currently under verification'
|
||||
git clone https://github.com/noisiver/mod-assistant.git mod-assistant
|
||||
fi
|
||||
if [ "$MODULE_REAGENT_BANK" = "1" ] && [ ! -d "mod-reagent-bank" ]; then
|
||||
@@ -447,7 +437,6 @@ if [ "$MODULE_REAGENT_BANK" = "1" ] && [ ! -d "mod-reagent-bank" ]; then
|
||||
echo ' 📖 Project: https://github.com/ZhengPeiRu21/mod-reagent-bank'
|
||||
echo ' ℹ️ Reagent banker NPC for storing crafting materials, frees bag space'
|
||||
echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation'
|
||||
echo ' 🔬 STATUS: IN TESTING - Currently under verification'
|
||||
git clone https://github.com/ZhengPeiRu21/mod-reagent-bank.git mod-reagent-bank
|
||||
fi
|
||||
if [ "$MODULE_BLACK_MARKET_AUCTION_HOUSE" = "1" ] && [ ! -d "mod-black-market" ]; then
|
||||
@@ -456,7 +445,6 @@ if [ "$MODULE_BLACK_MARKET_AUCTION_HOUSE" = "1" ] && [ ! -d "mod-black-market" ]
|
||||
echo ' ℹ️ MoP Black Market Auction House backported using Eluna Lua engine'
|
||||
echo ' ⚠️ SPECIAL MODULE: Uses Lua scripts, not C++ compilation'
|
||||
echo ' 🔧 REQUIRES: mod-eluna must be enabled and functional'
|
||||
echo ' 🔬 STATUS: IN TESTING - Currently under verification'
|
||||
git clone https://github.com/Youpeoples/Black-Market-Auction-House.git mod-black-market
|
||||
|
||||
# Special handling: Copy Lua scripts to lua_scripts directory
|
||||
@@ -768,7 +756,6 @@ ENABLED_MODULES=""
|
||||
[ "$MODULE_GAIN_HONOR_GUARD" = "1" ] && ENABLED_MODULES="$ENABLED_MODULES mod-gain-honor-guard"
|
||||
[ "$MODULE_ELUNA" = "1" ] && ENABLED_MODULES="$ENABLED_MODULES mod-eluna"
|
||||
[ "$MODULE_TIME_IS_TIME" = "1" ] && ENABLED_MODULES="$ENABLED_MODULES mod-time-is-time"
|
||||
[ "$MODULE_POCKET_PORTAL" = "1" ] && ENABLED_MODULES="$ENABLED_MODULES mod-pocket-portal"
|
||||
[ "$MODULE_RANDOM_ENCHANTS" = "1" ] && ENABLED_MODULES="$ENABLED_MODULES mod-random-enchants"
|
||||
[ "$MODULE_SOLOCRAFT" = "1" ] && ENABLED_MODULES="$ENABLED_MODULES mod-solocraft"
|
||||
[ "$MODULE_PVP_TITLES" = "1" ] && ENABLED_MODULES="$ENABLED_MODULES mod-pvp-titles"
|
||||
|
||||
@@ -41,6 +41,16 @@ read_env(){
|
||||
echo "$value"
|
||||
}
|
||||
|
||||
default_source_path(){
|
||||
local module_playerbots
|
||||
module_playerbots="$(read_env MODULE_PLAYERBOTS "0")"
|
||||
if [ "$module_playerbots" = "1" ]; then
|
||||
echo "./source/azerothcore-playerbots"
|
||||
else
|
||||
echo "./source/azerothcore"
|
||||
fi
|
||||
}
|
||||
|
||||
confirm(){
|
||||
local prompt="$1" default="$2" reply
|
||||
if [ "$ASSUME_YES" = "1" ]; then
|
||||
@@ -82,24 +92,39 @@ fi
|
||||
|
||||
STORAGE_PATH="$(read_env STORAGE_PATH "./storage")"
|
||||
if [[ "$STORAGE_PATH" != /* ]]; then
|
||||
STORAGE_PATH="$PROJECT_DIR/$STORAGE_PATH"
|
||||
STORAGE_PATH="$PROJECT_DIR/${STORAGE_PATH#./}"
|
||||
fi
|
||||
MODULES_DIR="$STORAGE_PATH/modules"
|
||||
SENTINEL_FILE="$MODULES_DIR/.requires_rebuild"
|
||||
|
||||
STORAGE_PATH_ABS="$STORAGE_PATH"
|
||||
|
||||
REBUILD_SOURCE_PATH="$SOURCE_OVERRIDE"
|
||||
default_path="$(default_source_path)"
|
||||
if [ -z "$REBUILD_SOURCE_PATH" ]; then
|
||||
REBUILD_SOURCE_PATH="$(read_env MODULES_REBUILD_SOURCE_PATH "./source/azerothcore")"
|
||||
REBUILD_SOURCE_PATH="$(read_env MODULES_REBUILD_SOURCE_PATH "$default_path")"
|
||||
fi
|
||||
|
||||
if [ -z "$REBUILD_SOURCE_PATH" ]; then
|
||||
REBUILD_SOURCE_PATH="./source/azerothcore"
|
||||
REBUILD_SOURCE_PATH="$default_path"
|
||||
fi
|
||||
|
||||
if [[ "$REBUILD_SOURCE_PATH" != /* ]]; then
|
||||
REBUILD_SOURCE_PATH="$(realpath "$REBUILD_SOURCE_PATH" 2>/dev/null || echo "$REBUILD_SOURCE_PATH")"
|
||||
REBUILD_SOURCE_PATH="$PROJECT_DIR/${REBUILD_SOURCE_PATH#./}"
|
||||
fi
|
||||
|
||||
if [[ "$default_path" != /* ]]; then
|
||||
default_path_abs="$PROJECT_DIR/${default_path#./}"
|
||||
else
|
||||
default_path_abs="$default_path"
|
||||
fi
|
||||
if [[ "$REBUILD_SOURCE_PATH" == "$STORAGE_PATH_ABS"* ]]; then
|
||||
echo "⚠️ Source path $REBUILD_SOURCE_PATH is inside shared storage ($STORAGE_PATH_ABS). Using local workspace $default_path_abs instead."
|
||||
REBUILD_SOURCE_PATH="$default_path_abs"
|
||||
fi
|
||||
|
||||
REBUILD_SOURCE_PATH="$(realpath "$REBUILD_SOURCE_PATH" 2>/dev/null || echo "$REBUILD_SOURCE_PATH")"
|
||||
|
||||
SOURCE_COMPOSE="$REBUILD_SOURCE_PATH/docker-compose.yml"
|
||||
if [ ! -f "$SOURCE_COMPOSE" ]; then
|
||||
echo "❌ Source docker-compose.yml not found at $SOURCE_COMPOSE"
|
||||
|
||||
@@ -9,24 +9,53 @@ if [ -f .env ]; then
|
||||
source .env
|
||||
fi
|
||||
|
||||
# Default values
|
||||
SOURCE_PATH="${MODULES_REBUILD_SOURCE_PATH:-./source/azerothcore}"
|
||||
# Remember project root for path normalization
|
||||
PROJECT_ROOT="$(pwd)"
|
||||
|
||||
# Convert to absolute path if relative
|
||||
if [[ "$SOURCE_PATH" != /* ]]; then
|
||||
SOURCE_PATH="$(pwd)/$SOURCE_PATH"
|
||||
fi
|
||||
# Default values
|
||||
MODULE_PLAYERBOTS="${MODULE_PLAYERBOTS:-0}"
|
||||
DEFAULT_STANDARD_PATH="./source/azerothcore"
|
||||
DEFAULT_PLAYERBOTS_PATH="./source/azerothcore-playerbots"
|
||||
|
||||
SOURCE_PATH_DEFAULT="$DEFAULT_STANDARD_PATH"
|
||||
if [ "$MODULE_PLAYERBOTS" = "1" ]; then
|
||||
SOURCE_PATH_DEFAULT="$DEFAULT_PLAYERBOTS_PATH"
|
||||
fi
|
||||
SOURCE_PATH="${MODULES_REBUILD_SOURCE_PATH:-$SOURCE_PATH_DEFAULT}"
|
||||
|
||||
STORAGE_PATH_VALUE="${STORAGE_PATH:-./storage}"
|
||||
if [[ "$STORAGE_PATH_VALUE" != /* ]]; then
|
||||
STORAGE_PATH_ABS="$PROJECT_ROOT/${STORAGE_PATH_VALUE#./}"
|
||||
else
|
||||
STORAGE_PATH_ABS="$STORAGE_PATH_VALUE"
|
||||
fi
|
||||
|
||||
DEFAULT_SOURCE_ABS="$PROJECT_ROOT/${SOURCE_PATH_DEFAULT#./}"
|
||||
|
||||
# Convert to absolute path if relative and ensure we stay local
|
||||
if [[ "$SOURCE_PATH" != /* ]]; then
|
||||
SOURCE_PATH="$PROJECT_ROOT/${SOURCE_PATH#./}"
|
||||
fi
|
||||
if [[ "$SOURCE_PATH" == "$STORAGE_PATH_ABS"* ]]; then
|
||||
echo "⚠️ Source path $SOURCE_PATH is inside shared storage ($STORAGE_PATH_ABS). Using local workspace $DEFAULT_SOURCE_ABS instead."
|
||||
SOURCE_PATH="$DEFAULT_SOURCE_ABS"
|
||||
MODULES_REBUILD_SOURCE_PATH="$SOURCE_PATH_DEFAULT"
|
||||
fi
|
||||
|
||||
ACORE_REPO_STANDARD="${ACORE_REPO_STANDARD:-https://github.com/azerothcore/azerothcore-wotlk.git}"
|
||||
ACORE_BRANCH_STANDARD="${ACORE_BRANCH_STANDARD:-master}"
|
||||
ACORE_REPO_PLAYERBOTS="${ACORE_REPO_PLAYERBOTS:-https://github.com/uprightbass360/azerothcore-wotlk-playerbots.git}"
|
||||
ACORE_BRANCH_PLAYERBOTS="${ACORE_BRANCH_PLAYERBOTS:-Playerbot}"
|
||||
|
||||
# Repository and branch selection based on playerbots mode
|
||||
if [ "$MODULE_PLAYERBOTS" = "1" ]; then
|
||||
REPO_URL="https://github.com/liyunfan1223/azerothcore-wotlk.git"
|
||||
BRANCH="Playerbot"
|
||||
echo "📌 Playerbots mode: Using liyunfan1223 fork, Playerbot branch"
|
||||
REPO_URL="$ACORE_REPO_PLAYERBOTS"
|
||||
BRANCH="$ACORE_BRANCH_PLAYERBOTS"
|
||||
echo "📌 Playerbots mode: Using $REPO_URL, branch $BRANCH"
|
||||
else
|
||||
REPO_URL="https://github.com/azerothcore/azerothcore-wotlk.git"
|
||||
BRANCH="master"
|
||||
echo "📌 Standard mode: Using official AzerothCore, master branch"
|
||||
REPO_URL="$ACORE_REPO_STANDARD"
|
||||
BRANCH="$ACORE_BRANCH_STANDARD"
|
||||
echo "📌 Standard mode: Using $REPO_URL, branch $BRANCH"
|
||||
fi
|
||||
|
||||
echo "📍 Repository: $REPO_URL"
|
||||
@@ -75,4 +104,4 @@ echo " Branch: $CURRENT_BRANCH"
|
||||
echo " Commit: $CURRENT_COMMIT"
|
||||
echo " Last commit: $(git log -1 --pretty=format:'%s (%an, %ar)')"
|
||||
|
||||
echo '🎉 Source repository setup complete!'
|
||||
echo '🎉 Source repository setup complete!'
|
||||
|
||||
31
setup.sh
31
setup.sh
@@ -904,14 +904,39 @@ fi
|
||||
fi
|
||||
if [ "$RUN_REBUILD_NOW" = "1" ] || [ "$AUTO_REBUILD_ON_DEPLOY" = "1" ]; then
|
||||
if [ -z "$MODULES_REBUILD_SOURCE_PATH_VALUE" ]; then
|
||||
MODULES_REBUILD_SOURCE_PATH_VALUE="./source/azerothcore"
|
||||
if [ "$MODULE_PLAYERBOTS" = "1" ]; then
|
||||
MODULES_REBUILD_SOURCE_PATH_VALUE="./source/azerothcore-playerbots"
|
||||
else
|
||||
MODULES_REBUILD_SOURCE_PATH_VALUE="./source/azerothcore"
|
||||
fi
|
||||
say INFO "Using default source path: ${MODULES_REBUILD_SOURCE_PATH_VALUE}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
local default_source_rel="./source/azerothcore"
|
||||
if [ "$MODULE_PLAYERBOTS" = "1" ]; then
|
||||
default_source_rel="./source/azerothcore-playerbots"
|
||||
fi
|
||||
|
||||
if [ -n "$MODULES_REBUILD_SOURCE_PATH_VALUE" ]; then
|
||||
local storage_abs="$STORAGE_PATH"
|
||||
if [[ "$storage_abs" != /* ]]; then
|
||||
storage_abs="$(pwd)/${storage_abs#./}"
|
||||
fi
|
||||
local candidate_path="$MODULES_REBUILD_SOURCE_PATH_VALUE"
|
||||
if [[ "$candidate_path" != /* ]]; then
|
||||
candidate_path="$(pwd)/${candidate_path#./}"
|
||||
fi
|
||||
if [[ "$candidate_path" == "$storage_abs"* ]]; then
|
||||
say WARNING "MODULES_REBUILD_SOURCE_PATH is inside shared storage (${candidate_path}). Using local workspace ${default_source_rel} instead."
|
||||
MODULES_REBUILD_SOURCE_PATH_VALUE="$default_source_rel"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$RUN_REBUILD_NOW" = "1" ]; then
|
||||
local rebuild_source_path="${MODULES_REBUILD_SOURCE_PATH_VALUE:-./source/azerothcore}"
|
||||
local default_source_path="$default_source_rel"
|
||||
local rebuild_source_path="${MODULES_REBUILD_SOURCE_PATH_VALUE:-$default_source_path}"
|
||||
if [ ! -f "$rebuild_source_path/docker-compose.yml" ]; then
|
||||
say INFO "Preparing source repository via scripts/setup-source.sh"
|
||||
if ! ./scripts/setup-source.sh >/dev/null 2>&1; then
|
||||
@@ -945,7 +970,7 @@ fi
|
||||
fi
|
||||
|
||||
if [ -z "$MODULES_REBUILD_SOURCE_PATH_VALUE" ]; then
|
||||
MODULES_REBUILD_SOURCE_PATH_VALUE="./source/azerothcore"
|
||||
MODULES_REBUILD_SOURCE_PATH_VALUE="$default_source_rel"
|
||||
fi
|
||||
|
||||
DB_PLAYERBOTS_NAME=${DB_PLAYERBOTS_NAME:-acore_playerbots}
|
||||
|
||||
Reference in New Issue
Block a user