From d0dac25644b4f52353b592254292566807a2e50c Mon Sep 17 00:00:00 2001 From: Andrew Mayorov Date: Fri, 13 Oct 2023 00:10:46 +0700 Subject: [PATCH] chore(ci): stop depending on git in `check-example-configs.sh` --- scripts/test/check-example-configs.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/test/check-example-configs.sh b/scripts/test/check-example-configs.sh index f71fb15eb..cffea24ce 100755 --- a/scripts/test/check-example-configs.sh +++ b/scripts/test/check-example-configs.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash set -euo pipefail -PROJ_DIR="$(git rev-parse --show-toplevel)" + +cd -P -- "$(dirname -- "$0")/../.." PROFILE="${PROFILE:-emqx}" DIR_NAME='examples' @@ -11,7 +12,7 @@ if [ "${PROFILE}" = 'emqx-enterprise' ]; then SCHEMA_MOD='emqx_enterprise_schema' fi -IFS=$'\n' read -r -d '' -a FILES < <(find "${PROJ_DIR}/rel/config/${DIR_NAME}" -name "*.example" 2>/dev/null | sort && printf '\0') +IFS=$'\n' read -r -d '' -a FILES < <(find "rel/config/${DIR_NAME}" -name "*.example" 2>/dev/null | sort && printf '\0') prepare_erl_libs() { local libs_dir="$1" @@ -30,7 +31,7 @@ prepare_erl_libs() { } # This is needed when checking schema -export EMQX_ETC_DIR="${PROJ_DIR}/apps/emqx/etc" +export EMQX_ETC_DIR="apps/emqx/etc" prepare_erl_libs "_build/$PROFILE/lib"