Merge pull request #7733 from thalesmg/fix-node-dump-root

fix(node_dump): define `RUNNER_ROOT_DIR` before sourcing vars
This commit is contained in:
Zaiming (Stone) Shi 2022-04-23 10:56:24 +01:00 committed by GitHub
commit 12d7975c36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -2,13 +2,13 @@
set -eu set -eu
# shellcheck disable=SC1090,SC1091 # shellcheck disable=SC1090,SC1091
ROOT_DIR="$(cd "$(dirname "$(readlink "$0" || echo "$0")")"/..; pwd -P)" RUNNER_ROOT_DIR="$(cd "$(dirname "$(readlink "$0" || echo "$0")")"/..; pwd -P)"
echo "Running node dump in ${ROOT_DIR}" echo "Running node dump in ${RUNNER_ROOT_DIR}"
# shellcheck disable=SC1090,SC1091 # shellcheck disable=SC1090,SC1091
. "$ROOT_DIR"/releases/emqx_vars . "$RUNNER_ROOT_DIR"/releases/emqx_vars
cd "${ROOT_DIR}" cd "${RUNNER_ROOT_DIR}"
DUMP="$RUNNER_LOG_DIR/node_dump_$(date +"%Y%m%d_%H%M%S").tar.gz" DUMP="$RUNNER_LOG_DIR/node_dump_$(date +"%Y%m%d_%H%M%S").tar.gz"
CONF_DUMP="$RUNNER_LOG_DIR/conf.dump" CONF_DUMP="$RUNNER_LOG_DIR/conf.dump"