chore: sync changes from ee

This commit is contained in:
Zaiming (Stone) Shi 2022-11-03 12:42:32 +01:00
parent 6f575aedd9
commit 21ebe3d50c
1 changed files with 7 additions and 4 deletions

View File

@ -120,10 +120,13 @@ get_release() ->
case lists:keyfind(emqx_vsn, 1, ?MODULE:module_info(compile)) of
false -> %% For TEST build or depedency build.
release_in_macro();
{_, Vsn} -> %% For emqx release build
VsnStr = release_in_macro(),
1 = string:str(Vsn, VsnStr), %% assert
Vsn
{_, VsnCompile} -> %% For emqx release build
VsnMacro = release_in_macro(),
case string:str(VsnCompile, VsnMacro) of
1 -> ok;
_ -> error({version_not_match, VsnCompile, VsnMacro})
end,
VsnCompile
end.
release_in_macro() ->