Commit graph

131 commits

Author SHA1 Message Date
Juan Jose Comellas
d4164c9606 When expanding lib_dirs, don't crash with 'volumerelative' paths 2013-06-18 19:19:41 -03:00
Juan Jose Comellas
708c190faa Allow the use of absolute paths in the lib_dirs configuration setting 2013-06-18 18:03:30 -03:00
Motiejus Jakštys
252b31f2a4 Fix searching for plugins
If a plugin is in a dependency, rebar didn't search for it carefully
enough.
2013-05-19 16:33:29 +03:00
Dave Smith
c77f8e13ca Fix missing call to cwd_predirs 2013-03-02 08:25:28 -07:00
Tuncer Ayaz
1036277525 rebar_core: fix broken indentation 2013-02-26 18:24:50 +01:00
Tuncer Ayaz
9715c40386 rebar_core: remove useless return after ?ABORT call 2013-02-26 18:24:50 +01:00
Tuncer Ayaz
2b9241bd2b rebar_core: document pre-dirs association 2013-02-26 18:24:50 +01:00
Tuncer Ayaz
4b8c81fb53 Implement 'rebar help CMD1 CMD2' and extend common 'rebar help' msg
* allow plugins to print help message for implemented commands
* append core rebar.config options to common 'rebar help' message
2012-12-31 20:45:11 +01:00
Tuncer Ayaz
a015892e21 Cleanup rebar_core and rebar_erlc_compiler
Rename rebar_core functions for improved readability.
Remove redundant comments and blank lines.
2012-11-15 15:41:51 +01:00
Tuncer Ayaz
b5e0d6d5db Fix rebar_core:restore_code_path (Reported-by: Siri Hansen)
Use erl_prim_loader:read_file_info instead of filelib:is_file to make
sure paths inside the escript archive are handled properly.
2012-08-09 16:15:10 +02:00
Tuncer Ayaz
0b18b208e2 Only print absolute filename if not in base_dir 2012-08-05 19:56:27 +02:00
Tuncer Ayaz
392adcf967 Refactor setup_env rebar_config funs 2012-08-04 14:04:27 +02:00
Tuncer Ayaz
636c02f0be Fix R13B03 build (Reported-by: Sergey Nartimov) 2012-07-28 19:51:57 +02:00
Tuncer Ayaz
252757c753 Do not use application:set_env 2012-07-23 13:17:11 +02:00
Tuncer Ayaz
4fe3306d99 Document rebar_config TODOs 2012-07-13 15:22:01 +02:00
Tuncer Ayaz
db78956295 Make sure cached setup_envs are reset 2012-07-13 15:22:01 +02:00
Tuncer Ayaz
e185e86bff Remove shared state 2012-07-13 15:21:56 +02:00
Tuncer Ayaz
50fbabda68 Manually report errors/warnings with absolute path 2012-06-11 19:40:59 +02:00
Tuncer Ayaz
8a046d898a Fix whitespace errors 2012-06-08 21:56:18 +02:00
Dave Smith
a7d64deb43 Introduce -k flag 2012-06-08 07:06:15 -06:00
Dave Smith
c86c99940d Remove ?FAIL in favor of ?ABORT 2012-06-08 07:06:15 -06:00
Tuncer Ayaz
15d1c275f8 Simplify and fix check if enter/leaving should be printed 2012-05-18 20:14:33 +02:00
Tuncer Ayaz
4f6ea2fd11 Do not print entering/leaving message if skip_dir 2012-05-18 19:56:02 +02:00
Tuncer Ayaz
7c418ed2b4 Add support for target-specific port options
{port_specs, [{".*", "priv/foo.so", ["c_src/foo.c"], [{env, []}]}]}.
2012-04-16 23:17:24 +02:00
Tuncer Ayaz
0e7defaf64 Fix typo in comment (thanks Michael Santos) 2012-04-16 17:42:48 +02:00
Tuncer Ayaz
4a9dae76a4 Fix #197 by printing 'Entering/Leaving directory' 2012-04-03 20:54:34 +02:00
Tuncer Ayaz
7bd8cbd8d9 Make error message more descriptive 2012-03-31 19:21:41 +02:00
Tuncer Ayaz
b7fb2aeec6 Fix loading of local plugins in sub directories 2012-02-03 17:37:41 +01:00
Yurii Rashkovskii
fe1652e137 Cache vsn info to avoid expensive vcs cmd calls 2012-02-02 21:54:15 +01:00
Tuncer Ayaz
5b15c851d8 Check for .app.src first 2012-01-13 19:39:28 +01:00
Tuncer Ayaz
eab5ae5298 Fix code clarity in dir type check 2012-01-13 19:00:44 +01:00
Tuncer Ayaz
7c327c1195 Fix rebar_core crash (reported-by: Jeremy Raymond) 2011-12-18 13:29:58 +01:00
Tuncer Ayaz
8c89a388bf Universally support apps=/skip_apps= 2011-12-12 21:20:34 +01:00
Tuncer Ayaz
8de2c84d89 Add support for arch-specific hooks
{pre_hooks,  [{"linux", compile, "c_src/build_linux.sh"}]}.
{post_hooks, [{"linux", compile, "c_src/build_linux.sh clean"}]}.
2011-12-05 14:17:18 +01:00
Tim Watson
86325b616d Allow plugins to participate in pre and post processing
This patch modifies rebar_core to allow plugins to participate in the
pre and post processing steps, giving plugin authors more flexibility
and control.
2011-10-20 16:31:08 +02:00
Tim Watson
30d1cdb31b Fix config handling in root_dir
Avoid overwriting custom config (passed with -C) when we are processing
the base_dir in rebar_core.
2011-10-05 13:49:27 +02:00
Tim Watson
36a40d3351 Fix missing plugin warnings
This patch fixes the warning logging when the number of missing plugins
is greater than one. The current code only works by accident, when a
single plugin is all that is missing.
2011-09-20 13:15:03 +02:00
Tuncer Ayaz
93128f2f6b Search plugin sources in base_dir and plugin_dir 2011-08-29 17:27:45 +02:00
Tuncer Ayaz
00b3d9d3cc Only compile relevant plugin sources 2011-08-29 17:27:45 +02:00
Tuncer Ayaz
4fe651cb5b Simplify check for empty list 2011-08-29 17:27:45 +02:00
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
Tuncer Ayaz
1dcf0d15dc Log a more descriptive message 2011-08-23 18:54:05 +02:00
Tuncer Ayaz
da31f90d1d Rename rebar_plugins to plugins for consistency 2011-08-16 17:34:09 +02:00
Tuncer Ayaz
1ec92ebac3 Do not warn if pre_/post_ cmd is not available 2011-07-08 13:40:47 +02:00
Tuncer Ayaz
8263f12594 Add support for $HOME/.rebar/config 2011-07-06 20:14:15 +02:00
Tim Watson
c07b0954eb 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.
```
2011-05-23 12:46:03 +01:00
Tuncer Ayaz
20dfd32c85 Add support for command-specific env for hooks 2011-04-21 21:38:16 +02:00
Tuncer Ayaz
bc98a4820e Simplify hook changes to rebar_core 2011-03-12 16:32:44 +01:00
Tim Watson
e76770511a Add pre and post script support for all commands
This change makes it possible to assign pre/post scripts to all
rebar commands. This allows users fine grained control over
when scripts and/or shell commands should be executed, where such
extensions are absolutely needed.

Several examples have been added to the rebar.config.sample file.
2011-03-12 16:31:41 +01:00
Juan Jose Comellas
58661a92e2 Convert the entries in the code path to absolute paths
Rebar will exit with {error,bad_directory} when trying to restore the code
path after it has finished working on a subdirectory if there are invalid
relative paths in it. The problem was seen when executing the last line of
rebar_erlc_compiler:doterl_compile/3 (true = code:set_path(CurrPath)).
2011-02-26 15:57:17 +01:00