diff --git a/src/emqx.app.src.script b/src/emqx.app.src.script index b76a11720..0355197b2 100644 --- a/src/emqx.app.src.script +++ b/src/emqx.app.src.script @@ -12,16 +12,15 @@ Config = case os:getenv("EMQX_DESC") of end, RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "v\[0-9\]+\.\[0-9\]+\.*") of - nomatch -> - Tag; - {match, _} -> - %% if it is a version number prefixed by 'v' then remove the 'v' - "v" ++ Vsn = Tag, - Vsn - end - end, + fun(Tag) -> + case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of + nomatch -> + Tag; + _ -> + %% if it is a version number prefixed by 'v' or 'e', then remove it + re:replace(Tag, "[v|e]", "", [{return ,list}]) + end + end, case os:getenv("EMQX_DEPS_DEFAULT_VSN") of false -> Config; % env var not defined