diff --git a/.github/workflows/elixir_apps_check.yaml b/.github/workflows/elixir_apps_check.yaml index 62000f421..e912db10f 100644 --- a/.github/workflows/elixir_apps_check.yaml +++ b/.github/workflows/elixir_apps_check.yaml @@ -35,6 +35,7 @@ jobs: run: ./scripts/check-elixir-applications.exs env: MIX_ENV: ${{ matrix.profile }} + PROFILE: ${{ matrix.profile }} # - name: check applications started with emqx_machine # run: ./scripts/check-elixir-emqx-machine-boot-discrepancies.exs # env: diff --git a/.github/workflows/run_relup_tests.yaml b/.github/workflows/run_relup_tests.yaml index 0cf7e51ee..d8ec38849 100644 --- a/.github/workflows/run_relup_tests.yaml +++ b/.github/workflows/run_relup_tests.yaml @@ -9,7 +9,6 @@ on: branches: - '**' tags: - - v* - e* pull_request: @@ -43,7 +42,7 @@ jobs: run: | set -x cd emqx - make emqx-tgz + export PROFILE='emqx-enterprise' make emqx-enterprise-tgz - uses: actions/upload-artifact@v3 name: Upload built emqx and test scenario diff --git a/apps/emqx/src/emqx_release.erl b/apps/emqx/src/emqx_release.erl index 94a0bd9a1..4ecf8598b 100644 --- a/apps/emqx/src/emqx_release.erl +++ b/apps/emqx/src/emqx_release.erl @@ -31,11 +31,21 @@ ce => "EMQX" }). +-define(EMQX_REL_NAME, #{ + ee => <<"Enterprise">>, + ce => <<"Opensource">> +}). + -define(EMQX_REL_VSNS, #{ ee => ?EMQX_RELEASE_EE, ce => ?EMQX_RELEASE_CE }). +-define(EMQX_REL_VSN_PREFIX, #{ + ee => "e", + ce => "v" +}). + %% @doc Return EMQX description. description() -> maps:get(edition(), ?EMQX_DESCS). @@ -46,14 +56,18 @@ description() -> -spec edition() -> ce | ee. -ifdef(EMQX_RELEASE_EDITION). edition() -> ?EMQX_RELEASE_EDITION. -edition_vsn_prefix() -> "e". -edition_longstr() -> <<"Enterprise">>. -else. edition() -> ce. -edition_vsn_prefix() -> "v". -edition_longstr() -> <<"Opensource">>. -endif. +%% @doc Return EMQX version prefix string. +edition_vsn_prefix() -> + maps:get(edition(), ?EMQX_REL_VSN_PREFIX). + +%% @doc Return EMQX edition name, ee => Enterprise ce => Opensource. +edition_longstr() -> + maps:get(edition(), ?EMQX_REL_NAME). + %% @doc Return the release version. version() -> case lists:keyfind(emqx_vsn, 1, ?MODULE:module_info(compile)) of diff --git a/changes/v5.0.15/fix-9769.en.md b/changes/v5.0.15/fix-9769.en.md new file mode 100644 index 000000000..e07397363 --- /dev/null +++ b/changes/v5.0.15/fix-9769.en.md @@ -0,0 +1 @@ +Fix Erlang shell prompt version prefix. e5.0.15 -> v5.0.15 diff --git a/changes/v5.0.15/fix-9769.zh.md b/changes/v5.0.15/fix-9769.zh.md new file mode 100644 index 000000000..c7e63b862 --- /dev/null +++ b/changes/v5.0.15/fix-9769.zh.md @@ -0,0 +1 @@ +修复 Eralng 控制台版本号前缀的打印错误 e5.0.15 -> v5.0.15 diff --git a/rebar.config.erl b/rebar.config.erl index e8b1271f2..4ff94bd78 100644 --- a/rebar.config.erl +++ b/rebar.config.erl @@ -205,7 +205,12 @@ prod_overrides() -> [{add, [{erl_opts, [deterministic]}]}]. profiles() -> - profiles_ce() ++ profiles_ee() ++ profiles_dev(). + case get_edition_from_profile_env() of + ee -> + profiles_ee(); + ce -> + profiles_ce() + end ++ profiles_dev(). profiles_ce() -> Vsn = get_vsn(emqx),