diff options
author | Tim Watson <watson.timothy@gmail.com> | 2011-05-23 12:46:03 +0100 |
---|---|---|
committer | Tim Watson <watson.timothy@gmail.com> | 2011-05-23 12:46:03 +0100 |
commit | c07b0954ebac6913dba82b3e81bca7f7a39d8293 (patch) | |
tree | b663afe1773a0190318ea7185a6f6f8d119968a5 /test/upgrade_project/rel | |
parent | 892dc48a860892b3eeb36e519287c26f09fff5b8 (diff) |
Allow plugins to run before/after a rebar command.
This patch makes a small change in rebar_core that checks the list
of valid plugins to see if any of them export a pre/post processing
function for the current command. This logic is applied only to the
plugins and allows plugin authors to hook into rebar's execution by
using a naming convention that matches the one used for scripting hooks.
Example:
```erlang
-module(my_rebar_plugin).
-export([pre_compile/2]).
pre_compile(Config, AppFile) ->
rebar_log:log(debug, "PRECOMPILE: ~p:~p~n",
[AppFile, Config]),
ok.
```
Diffstat (limited to 'test/upgrade_project/rel')
0 files changed, 0 insertions, 0 deletions