modify environment location

This commit is contained in:
SennayT
2026-05-28 13:29:37 +03:00
parent 39954f6e67
commit d462ddaf29

View File

@@ -14,7 +14,7 @@ set -euo pipefail
DEPLOY_USER="${DEPLOY_USER:-tria}" DEPLOY_USER="${DEPLOY_USER:-tria}"
BRANCH="${BRANCH:?BRANCH is required}" BRANCH="${BRANCH:?BRANCH is required}"
BRANCH_SLUG="${BRANCH_SLUG:-$(echo "${BRANCH}" | tr "[:upper:]" "[:lower:]" | sed -E "s/[^a-z0-9]+/-/g; s/^-+//; s/-+$//")}" BRANCH_SLUG="${BRANCH_SLUG:-$(echo "${BRANCH}" | tr "[:upper:]" "[:lower:]" | sed -E "s/[^a-z0-9]+/-/g; s/^-+//; s/-+$//")}"
ENV_ROOT="${ENV_ROOT:-/home/${DEPLOY_USER}/environmen/${PROJECT:?PROJECT is required}/${BRANCH_SLUG}}" ENV_ROOT="${ENV_ROOT:-/home/${DEPLOY_USER}/environment/edr/${PROJECT:?PROJECT is required}/${BRANCH_SLUG}}"
if [[ ! -d "${ENV_ROOT}" ]]; then if [[ ! -d "${ENV_ROOT}" ]]; then
echo "Environment directory not found: ${ENV_ROOT}" >&2 echo "Environment directory not found: ${ENV_ROOT}" >&2