1
0
Fork 0
mirror of https://github.com/correl/rebar.git synced 2024-12-20 12:56:02 +00:00
rebar/inttest/tplugins/test_plugin.erl
Tim Watson 3b58935b86 Load plugins dynamically from source
This patch updates rebar_core to look for missing plugins (i.e. those
that aren't found on the code path at runtime) in a configurable
plugin directory, and dynamically compile and load them at runtime.

By default, the directory "plugins" is searched, although this can be
overriden by setting the plugin_dir in your rebar.config.
2011-08-29 17:27:45 +02:00

8 lines
282 B
Erlang

-module(test_plugin).
-compile(export_all).
fwibble(Config, _) ->
Pwd = rebar_utils:get_cwd(),
Ok = filelib:is_regular(filename:join(Pwd, "fwibble.test")),
rebar_log:log(info, "~p:~p in ~s :: ~p~n", [test_plugin, clean, Pwd, Ok]),
ok = file:delete("fwibble.test").