fix(deployment): correct repo paths for deployment scripts when run from devops-tools directory

This commit is contained in:
root 2026-05-09 21:49:49 +00:00
parent ca085ce63e
commit bdf0fba468
2 changed files with 4 additions and 3 deletions

View File

@ -26,6 +26,7 @@ fail() { echo -e "${RED}[$(date +%H:%M:%S)] ✗${NC} $*"; exit 1; }
# ── Configuration ────────────────────────────────────────────────────
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REPOS_BASE_DIR="${SCRIPT_DIR}/.."
cd "$SCRIPT_DIR"
PRODUCTION_REPOS=(
@ -70,7 +71,7 @@ fi
# ── Deploy Function ───────────────────────────────────────────────────
deploy_repo() {
local repo="$1"
local repo_dir="${SCRIPT_DIR}/${repo}"
local repo_dir="${REPOS_BASE_DIR}/${repo}"
log "══════════════════════════════════════════════════════════════════════"
log "Deploying: $repo"
@ -133,7 +134,7 @@ deploy_repo() {
warn "No docker-compose.yml found in $repo, skipping Docker deployment"
fi
cd "$SCRIPT_DIR"
cd "$REPOS_BASE_DIR"
}
# ── Deploy All Repos ───────────────────────────────────────────────────

View File

@ -26,7 +26,7 @@ fail() { echo -e "${RED}[$(date +%H:%M:%S)] ✗${NC} $*"; exit 1; }
# ── Configuration ────────────────────────────────────────────────────
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REPO_DIR="${SCRIPT_DIR}/learning_ai_invt_trdg"
REPO_DIR="${SCRIPT_DIR}/../learning_ai_invt_trdg"
cd "$SCRIPT_DIR"
FORCE=false