summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rebar_port_compiler.erl17
-rw-r--r--src/rebar_post_script.erl18
-rw-r--r--src/rebar_pre_script.erl18
3 files changed, 53 insertions, 0 deletions
diff --git a/src/rebar_port_compiler.erl b/src/rebar_port_compiler.erl
index b230af1..a281b29 100644
--- a/src/rebar_port_compiler.erl
+++ b/src/rebar_port_compiler.erl
@@ -182,6 +182,15 @@ run_precompile_hook(Config, Env) ->
undefined ->
ok;
{Script, BypassFileName} ->
+ ?CONSOLE(
+ <<
+ "WARNING: option deprecated~n"
+ "Config option 'port_pre_script' has been deprecated "
+ "in favor of ~n{pre_hooks, [{compile, \"script\"}]}."
+ "~nskipfile support has also been removed. Add skipfile"
+ " logic to the~nscript instead.~nFuture builds of rebar"
+ " will remove the option 'port_pre_script'.~n~n"
+ >>, []),
case filelib:is_regular(BypassFileName) of
false ->
?CONSOLE("Running ~s\n", [Script]),
@@ -198,6 +207,14 @@ run_cleanup_hook(Config) ->
undefined ->
ok;
Script ->
+ ?CONSOLE(
+ <<
+ "WARNING: option deprecated~n"
+ "Config option 'port_pre_script' has been deprecated "
+ "in favor of ~n{post_hooks, [{clean, \"script\"}]}."
+ "~nFuture builds of rebar will remove the option "
+ "'port_pre_script'.~n~n"
+ >>, []),
?CONSOLE("Running ~s\n", [Script]),
{ok, _} = rebar_utils:sh(Script, []),
ok
diff --git a/src/rebar_post_script.erl b/src/rebar_post_script.erl
index c7f2d01..39185a9 100644
--- a/src/rebar_post_script.erl
+++ b/src/rebar_post_script.erl
@@ -51,6 +51,24 @@ execute_post_script(Config, Key) ->
undefined ->
ok;
Script ->
+ deprecated(Key),
{ok, _} = rebar_utils:sh(Script, []),
ok
end.
+
+deprecated(compile_post_script) ->
+ ?CONSOLE(
+ <<
+ "WARNING: option deprecated~n"
+ "Config option 'compile_post_script' has been deprecated in favor"
+ " of ~noption {post_hooks, [{compile, \"script\"}]}.~nFuture builds "
+ "of rebar will remove the option 'compile_post_script'.~n~n"
+ >>, []);
+deprecated(clean_post_script) ->
+ ?CONSOLE(
+ <<
+ "WARNING: option deprecated~n"
+ "Config option 'clean_post_script' has been deprecated in favor"
+ " of ~noption {post_hooks, [{clean, \"script\"}]}.~nFuture builds "
+ "of rebar will remove the option 'clean_post_script'.~n~n"
+ >>, []).
diff --git a/src/rebar_pre_script.erl b/src/rebar_pre_script.erl
index 9097807..b23f469 100644
--- a/src/rebar_pre_script.erl
+++ b/src/rebar_pre_script.erl
@@ -51,6 +51,24 @@ execute_pre_script(Config, Key) ->
undefined ->
ok;
Script ->
+ deprecated(Key),
{ok, _} = rebar_utils:sh(Script, []),
ok
end.
+
+deprecated(compile_pre_script) ->
+ ?CONSOLE(
+ <<
+ "WARNING: option deprecated~n"
+ "Config option 'compile_pre_script' has been deprecated in favor"
+ " of ~n{pre_hooks, [{compile, \"script\"}]}.~nFuture builds of"
+ " rebar will remove the option 'compile_pre_script'.~n~n"
+ >>, []);
+deprecated(clean_pre_script) ->
+ ?CONSOLE(
+ <<
+ "WARNING: option deprecated~n"
+ "Config option 'clean_pre_script' has been deprecated in favor"
+ " of ~n{pre_hooks, [{clean, \"script\"}]}.~nFuture builds of"
+ " rebar will remove the option 'clean_pre_script'.~n~n"
+ >>, []).