Merge pull request #9769 from zmstone/0116-fix-version-prefix-in-restricted-shell-prompt
fix: version number previs in restricted shell
This commit is contained in:
commit
999d40ef1d
|
@ -35,6 +35,7 @@ jobs:
|
||||||
run: ./scripts/check-elixir-applications.exs
|
run: ./scripts/check-elixir-applications.exs
|
||||||
env:
|
env:
|
||||||
MIX_ENV: ${{ matrix.profile }}
|
MIX_ENV: ${{ matrix.profile }}
|
||||||
|
PROFILE: ${{ matrix.profile }}
|
||||||
# - name: check applications started with emqx_machine
|
# - name: check applications started with emqx_machine
|
||||||
# run: ./scripts/check-elixir-emqx-machine-boot-discrepancies.exs
|
# run: ./scripts/check-elixir-emqx-machine-boot-discrepancies.exs
|
||||||
# env:
|
# env:
|
||||||
|
|
|
@ -9,7 +9,6 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- '**'
|
- '**'
|
||||||
tags:
|
tags:
|
||||||
- v*
|
|
||||||
- e*
|
- e*
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
|
@ -43,7 +42,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
cd emqx
|
cd emqx
|
||||||
make emqx-tgz
|
export PROFILE='emqx-enterprise'
|
||||||
make emqx-enterprise-tgz
|
make emqx-enterprise-tgz
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
name: Upload built emqx and test scenario
|
name: Upload built emqx and test scenario
|
||||||
|
|
|
@ -31,11 +31,21 @@
|
||||||
ce => "EMQX"
|
ce => "EMQX"
|
||||||
}).
|
}).
|
||||||
|
|
||||||
|
-define(EMQX_REL_NAME, #{
|
||||||
|
ee => <<"Enterprise">>,
|
||||||
|
ce => <<"Opensource">>
|
||||||
|
}).
|
||||||
|
|
||||||
-define(EMQX_REL_VSNS, #{
|
-define(EMQX_REL_VSNS, #{
|
||||||
ee => ?EMQX_RELEASE_EE,
|
ee => ?EMQX_RELEASE_EE,
|
||||||
ce => ?EMQX_RELEASE_CE
|
ce => ?EMQX_RELEASE_CE
|
||||||
}).
|
}).
|
||||||
|
|
||||||
|
-define(EMQX_REL_VSN_PREFIX, #{
|
||||||
|
ee => "e",
|
||||||
|
ce => "v"
|
||||||
|
}).
|
||||||
|
|
||||||
%% @doc Return EMQX description.
|
%% @doc Return EMQX description.
|
||||||
description() ->
|
description() ->
|
||||||
maps:get(edition(), ?EMQX_DESCS).
|
maps:get(edition(), ?EMQX_DESCS).
|
||||||
|
@ -46,14 +56,18 @@ description() ->
|
||||||
-spec edition() -> ce | ee.
|
-spec edition() -> ce | ee.
|
||||||
-ifdef(EMQX_RELEASE_EDITION).
|
-ifdef(EMQX_RELEASE_EDITION).
|
||||||
edition() -> ?EMQX_RELEASE_EDITION.
|
edition() -> ?EMQX_RELEASE_EDITION.
|
||||||
edition_vsn_prefix() -> "e".
|
|
||||||
edition_longstr() -> <<"Enterprise">>.
|
|
||||||
-else.
|
-else.
|
||||||
edition() -> ce.
|
edition() -> ce.
|
||||||
edition_vsn_prefix() -> "v".
|
|
||||||
edition_longstr() -> <<"Opensource">>.
|
|
||||||
-endif.
|
-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.
|
%% @doc Return the release version.
|
||||||
version() ->
|
version() ->
|
||||||
case lists:keyfind(emqx_vsn, 1, ?MODULE:module_info(compile)) of
|
case lists:keyfind(emqx_vsn, 1, ?MODULE:module_info(compile)) of
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Fix Erlang shell prompt version prefix. e5.0.15 -> v5.0.15
|
|
@ -0,0 +1 @@
|
||||||
|
修复 Eralng 控制台版本号前缀的打印错误 e5.0.15 -> v5.0.15
|
|
@ -205,7 +205,12 @@ prod_overrides() ->
|
||||||
[{add, [{erl_opts, [deterministic]}]}].
|
[{add, [{erl_opts, [deterministic]}]}].
|
||||||
|
|
||||||
profiles() ->
|
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() ->
|
profiles_ce() ->
|
||||||
Vsn = get_vsn(emqx),
|
Vsn = get_vsn(emqx),
|
||||||
|
|
Loading…
Reference in New Issue