diff --git a/.github/actions/detect-profiles/action.yaml b/.github/actions/detect-profiles/action.yaml index 555674c28..bb248771c 100644 --- a/.github/actions/detect-profiles/action.yaml +++ b/.github/actions/detect-profiles/action.yaml @@ -15,7 +15,15 @@ runs: shell: bash run: | git config --global --add safe.directory "$GITHUB_WORKSPACE" - if make emqx-ee --dry-run > /dev/null 2>&1; then + if [ -d source ]; then + ## source code downloaded + cd source + fi + if [ ! -d .git ]; then + echo "Not git dir, $(pwd)" + exit 1 + fi + if [ -f 'EMQX_ENTERPRISE' ]; then echo "::set-output name=profiles::[\"emqx-ee\"]" echo "https://ci%40emqx.io:${{ inputs.ci_git_token }}@github.com" > $HOME/.git-credentials git config --global credential.helper store diff --git a/build b/build index 7577d2219..429935a10 100755 --- a/build +++ b/build @@ -67,7 +67,14 @@ make_rel() { } relup_db() { - ./scripts/relup-base-vsns.escript "$@" ./data/relup-paths.eterm + case "$PROFILE" in + *-ee*) + ./scripts/relup-base-vsns.escript "$@" ./data/relup-paths-ee.eterm + ;; + *) + ./scripts/relup-base-vsns.escript "$@" ./data/relup-paths.eterm + ;; + esac } ## unzip previous version .zip files to _build/$PROFILE/rel/emqx/releases before making relup @@ -84,7 +91,6 @@ make_relup() { if [[ "$OTP_BASE" != "$OTP_VSN" ]]; then OTP_CHANGED='yes' fi - OTP_BASE=$(relup_db otp-vsn-for "$PKG_VSN") zip_file="_upgrade_base/${PROFILE}-$(env OTP_VSN="$OTP_BASE" PKG_VSN="$BASE_VSN" ./scripts/pkg-full-vsn.sh 'vsn_exact').zip" if [ ! -d "$releases_dir/$BASE_VSN" ]; then local tmp_dir diff --git a/src/emqx_relup.erl b/src/emqx_relup.erl index dc25aa8ce..182a60c7b 100644 --- a/src/emqx_relup.erl +++ b/src/emqx_relup.erl @@ -63,7 +63,7 @@ reload_components() -> ?INFO("reloading resource providers ..."), emqx_rule_engine:load_providers(), ?INFO("loading plugins ..."), - load_plugins(), + _ = load_plugins(), ok. -endif.