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
|
||||
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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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]}]}].
|
||||
|
||||
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),
|
||||
|
|
Loading…
Reference in New Issue