Merge pull request #8188 from zmstone/0612-build-exclude-sub-build-dirs
build: ignore _build sub-dir in release dir
This commit is contained in:
commit
83e9876e68
|
@ -1,6 +1,6 @@
|
||||||
{application, emqx_management,
|
{application, emqx_management,
|
||||||
[{description, "EMQ X Management API and CLI"},
|
[{description, "EMQ X Management API and CLI"},
|
||||||
{vsn, "4.3.13"}, % strict semver, bump manually!
|
{vsn, "4.3.14"}, % strict semver, bump manually!
|
||||||
{modules, []},
|
{modules, []},
|
||||||
{registered, [emqx_management_sup]},
|
{registered, [emqx_management_sup]},
|
||||||
{applications, [kernel,stdlib,minirest]},
|
{applications, [kernel,stdlib,minirest]},
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
%% -*- mode: erlang -*-
|
%% -*- mode: erlang -*-
|
||||||
{VSN,
|
{VSN,
|
||||||
[ {<<"4\\.3\\.([0-9]|1[0-4])">>,
|
[ {<<"4\\.3\\.[0-9]+">>,
|
||||||
[ {apply,{minirest,stop_http,['http:management']}},
|
[ {apply,{minirest,stop_http,['http:management']}},
|
||||||
{apply,{minirest,stop_http,['https:management']}},
|
{apply,{minirest,stop_http,['https:management']}},
|
||||||
{restart_application, emqx_management}
|
{restart_application, emqx_management}
|
||||||
]},
|
]},
|
||||||
{<<".*">>, []}
|
{<<".*">>, []}
|
||||||
],
|
],
|
||||||
[ {<<"4\\.3\\.([0-9]|1[0-4])">>,
|
[ {<<"4\\.3\\.[0-9]+">>,
|
||||||
[ {apply,{minirest,stop_http,['http:management']}},
|
[ {apply,{minirest,stop_http,['http:management']}},
|
||||||
{apply,{minirest,stop_http,['https:management']}},
|
{apply,{minirest,stop_http,['https:management']}},
|
||||||
{restart_application, emqx_management}
|
{restart_application, emqx_management}
|
||||||
|
|
|
@ -55,7 +55,10 @@ app_specific_actions(_) ->
|
||||||
[].
|
[].
|
||||||
|
|
||||||
ignored_apps() ->
|
ignored_apps() ->
|
||||||
[gpb, emqx_dashboard, emqx_management] ++ otp_standard_apps().
|
[gpb, %% only a build tool
|
||||||
|
emqx_dashboard, %% generic appup file for all versions
|
||||||
|
emqx_management %% generic appup file for all versions
|
||||||
|
] ++ otp_standard_apps().
|
||||||
|
|
||||||
main(Args) ->
|
main(Args) ->
|
||||||
#{prev_tag := Baseline} = Options = parse_args(Args, default_options()),
|
#{prev_tag := Baseline} = Options = parse_args(Args, default_options()),
|
||||||
|
@ -530,8 +533,10 @@ contains_contents(File, Upgrade, Downgrade) ->
|
||||||
|
|
||||||
index_apps(ReleaseDir) ->
|
index_apps(ReleaseDir) ->
|
||||||
log("INFO: indexing apps in ~s~n", [ReleaseDir]),
|
log("INFO: indexing apps in ~s~n", [ReleaseDir]),
|
||||||
Apps0 = maps:from_list([index_app(filename:join(ReleaseDir, AppFile)) ||
|
AppFiles0 = filelib:wildcard("**/ebin/*.app", ReleaseDir),
|
||||||
AppFile <- filelib:wildcard("**/ebin/*.app", ReleaseDir)]),
|
%% everything in _build sub-dir e.g. cuttlefish/_build should be ignored
|
||||||
|
AppFiles = lists:filter(fun(File) -> re:run(File, "_build") =:= nomatch end, AppFiles0),
|
||||||
|
Apps0 = maps:from_list([index_app(filename:join(ReleaseDir, AppFile)) || AppFile <- AppFiles]),
|
||||||
maps:without(ignored_apps(), Apps0).
|
maps:without(ignored_apps(), Apps0).
|
||||||
|
|
||||||
index_app(AppFile) ->
|
index_app(AppFile) ->
|
||||||
|
|
Loading…
Reference in New Issue