diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2016-08-13 17:58:15 -0400 |
---|---|---|
committer | Fred Hebert <mononcqc@ferd.ca> | 2016-08-13 17:58:15 -0400 |
commit | ef3e9e7aa2bcc103e064165d24881fd5d961ed70 (patch) | |
tree | 62831af54e4976509841989ba0d042306d3c4775 | |
parent | 4b63d35b940fcf88892a220b6e6639511c7252da (diff) |
Make the escriptize provider hookable
This will allow to move and modify the generated files
-rw-r--r-- | src/rebar_prv_escriptize.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/rebar_prv_escriptize.erl b/src/rebar_prv_escriptize.erl index 06b54ed..7ee20c2 100644 --- a/src/rebar_prv_escriptize.erl +++ b/src/rebar_prv_escriptize.erl @@ -61,8 +61,11 @@ desc() -> "the project's and its dependencies' BEAM files.". do(State) -> + Providers = rebar_state:providers(State), + Cwd = rebar_state:dir(State), + rebar_hooks:run_project_and_app_hooks(Cwd, pre, ?PROVIDER, Providers, State), ?INFO("Building escript...", []), - case rebar_state:get(State, escript_main_app, undefined) of + Res = case rebar_state:get(State, escript_main_app, undefined) of undefined -> case rebar_state:project_apps(State) of [App] -> @@ -78,7 +81,9 @@ do(State) -> _ -> ?PRV_ERROR({bad_name, Name}) end - end. + end, + rebar_hooks:run_project_and_app_hooks(Cwd, post, ?PROVIDER, Providers, State), + Res. escriptize(State0, App) -> AppName = rebar_app_info:name(App), |