summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rebar_prv_release.erl4
-rw-r--r--src/rebar_prv_tar.erl4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/rebar_prv_release.erl b/src/rebar_prv_release.erl
index f94f90d..982b392 100644
--- a/src/rebar_prv_release.erl
+++ b/src/rebar_prv_release.erl
@@ -40,6 +40,9 @@ do(State) ->
[?DEFAULT_CHECKOUTS_DIR, DepsDir | ProjectAppDirs]),
OutputDir = filename:join(rebar_dir:base_dir(State), ?DEFAULT_RELEASE_DIR),
AllOptions = string:join(["release" | Options], " "),
+ Cwd = rebar_state:dir(State),
+ Providers = rebar_state:providers(State),
+ rebar_hooks:run_all_hooks(Cwd, pre, ?PROVIDER, Providers, State),
try
case rebar_state:get(State, relx, []) of
[] ->
@@ -52,6 +55,7 @@ do(State) ->
,{output_dir, OutputDir}
,{caller, Caller}], AllOptions)
end,
+ rebar_hooks:run_all_hooks(Cwd, post, ?PROVIDER, Providers, State),
{ok, State}
catch
throw:T ->
diff --git a/src/rebar_prv_tar.erl b/src/rebar_prv_tar.erl
index 84fe395..0c04d72 100644
--- a/src/rebar_prv_tar.erl
+++ b/src/rebar_prv_tar.erl
@@ -40,6 +40,9 @@ do(State) ->
[?DEFAULT_CHECKOUTS_DIR, DepsDir | ProjectAppDirs]),
OutputDir = filename:join(rebar_dir:base_dir(State), ?DEFAULT_RELEASE_DIR),
AllOptions = string:join(["release", "tar" | Options], " "),
+ Cwd = rebar_state:dir(State),
+ Providers = rebar_state:providers(State),
+ rebar_hooks:run_all_hooks(Cwd, pre, ?PROVIDER, Providers, State),
case rebar_state:get(State, relx, []) of
[] ->
relx:main([{lib_dirs, LibDirs}
@@ -51,6 +54,7 @@ do(State) ->
,{output_dir, OutputDir}
,{caller, Caller}], AllOptions)
end,
+ rebar_hooks:run_all_hooks(Cwd, post, ?PROVIDER, Providers, State),
{ok, State}.
-spec format_error(any()) -> iolist().