7 lines
324 B
Bash
7 lines
324 B
Bash
# Loads .env for the CI scripts: this checkout's, else the main checkout's (worktrees have none).
|
|
_ci_env="$ROOT/.env"
|
|
[ -f "$_ci_env" ] || _ci_env="$(dirname "$(git -C "$ROOT" rev-parse --path-format=absolute --git-common-dir)")/.env"
|
|
[ -f "$_ci_env" ] && set -a && . "$_ci_env" && set +a
|
|
ENV_FILE="$_ci_env"
|
|
unset _ci_env
|