From 3b58935b8621a876afad2f649bbd00a12f7ab03f Mon Sep 17 00:00:00 2001 From: Tim Watson Date: Tue, 3 May 2011 00:15:19 +0100 Subject: 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. --- inttest/tplugins/test_plugin.erl | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 inttest/tplugins/test_plugin.erl (limited to 'inttest/tplugins/test_plugin.erl') diff --git a/inttest/tplugins/test_plugin.erl b/inttest/tplugins/test_plugin.erl new file mode 100644 index 0000000..461247c --- /dev/null +++ b/inttest/tplugins/test_plugin.erl @@ -0,0 +1,8 @@ +-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"). -- cgit v1.1