From 21ebe3d50cfa4936a16572afbde29cd54f0a29d7 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Thu, 3 Nov 2022 12:42:32 +0100 Subject: [PATCH] chore: sync changes from ee --- src/emqx_app.erl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/emqx_app.erl b/src/emqx_app.erl index 9c92be1f1..a2ff06cdf 100644 --- a/src/emqx_app.erl +++ b/src/emqx_app.erl @@ -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() ->