Commit graph

1158 commits

Author SHA1 Message Date
Tuncer Ayaz
ab79534507 Limit line length 2011-11-26 11:36:26 +01:00
Tuncer Ayaz
9632860ac2 Add Smith Winston to THANKS file 2011-11-26 10:38:56 +01:00
smithwinston
1eaf88d1d0 Add root_dir option to reltool.config
When generating a node using rebar generate, rebar always used
code:root_dir() to find the Erlang installation to clone into the node
tree.  However, for anyone wishing to build a cross-compiled node, there
was no way to override this.  This patch adds a new option to
reltool.config file to allow an alternate root_dir to be specified, for
example:

{root_dir, "/tmp/otp_R14B03_armv7l"}

This assumes that the contents of /tmp/otp_R14B03_armv7l has been
generated using the instructions found in the xcomp directory in your
$ERL_TOP structure.  NOTE: you may have to add additional filters to
exclude files not present in the xcomp version, such as the .smp files
if you have disabled that.
2011-11-26 10:38:27 +01:00
Bob Ippolito
a54dd53673 Treat HEAD as a branch to fix regressions caused by 3ef7db5 2011-11-16 21:46:18 +01:00
Tuncer Ayaz
147d5e3b56 Remove gratuitous space in debug log 2011-11-09 22:56:54 +01:00
Tuncer Ayaz
e62ea1994c Remove gratuitous prefix in error log 2011-11-08 16:04:27 +01:00
Tuncer Ayaz
d2cf35ad02 Remove obsolete comments (thanks Tim Watson) 2011-11-04 18:53:36 +01:00
Klas Johansson
896e8505b2 Stop applications before killing extra processes
This means that applications get a chance to shut down themselves,
before rebar will start killing their processes.  This avoids ERROR
REPORTS from application supervisors.
2011-11-02 20:08:24 +01:00
Jan Kloetzke
b10224be62 Fix rebar_utils:expand_env_variable/3
The function may fail with a badarg exception because the first regex
returns an iolist() which is allowed to be a improper list. In this case
'++' cannot append to the iolist. The correct way to append something to
an iolist() is

  [iolist(), "tail"]

because iolist's are allowed to be arbitrarily deep lists.
2011-11-01 22:00:15 +01:00
Tuncer Ayaz
9197e70bd7 Fix formatting 2011-10-26 23:23:46 +02:00
Tuncer Ayaz
c373f29292 Fix comments and formatting 2011-10-26 23:16:36 +02:00
Dave Smith
17616d1078 Overhaul environment expansion for better performance
The introduction of setup_env as a global concept caused the rebar_port_compiler
implementation to start getting called a LOT. The expansion of environment variables
that happens in the port compiler was O(n^n), which means you could see upwards of
80k invocations of lists:foldl on a single app "./rebar clean". This commit reworks
the expansion to be O(n^2), and reduces the running time for the same operation by
60%+. On a large project like Riak, the end result is that a build went from 200
seconds to 73.
2011-10-26 23:16:36 +02:00
Tuncer Ayaz
b65d5904f5 Fix deps_dir sample config 2011-10-26 17:11:03 +02:00
Dave Smith
1c1620a244 When profiling, save analysis results to disk 2011-10-25 23:58:53 -06:00
Dave Smith
45fc18f990 Add support for -p flag to profile rebar run 2011-10-25 13:33:40 -06:00
Tuncer Ayaz
28b9cebf0a Add -D support to rebar_port_compiler 2011-10-23 01:12:54 +02:00
Tuncer Ayaz
8eeca123e5 Cleanup and fix -D for erl_opts 2011-10-23 01:12:54 +02:00
Tuncer Ayaz
a0dcc624d9 Add -D option 2011-10-22 21:03:22 +02:00
Tuncer Ayaz
74ca540939 Use same variable names as file:make_link/2 2011-10-21 17:59:29 +02:00
Tuncer Ayaz
285ca0f6be Add overlay command to shell completion 2011-10-20 20:56:34 +02:00
Tuncer Ayaz
f8c698eb7f Update THANKS file 2011-10-20 20:29:16 +02:00
Przemysław Dąbek
eb23571b8b Add possibility to make symbolic links
Simple feature, useful to make link to something without copying it.
2011-10-20 20:29:16 +02:00
Fabian Linzberger
176ec0e71e Work around functions not found in source
For parameterized modules, the beam code will have a compiler
generated new/1 and instance/1 function.

If while checking the beam, xref detects one of those is unused, the
rebars xref wrapper will try to find the location of the definition of
that function in the source code for the module (to give a more
specific warning to the user). Since the function was generated by the
compiler it does not actually exist in the source, and rebar crashes
at that stage. This patch works around that issue.
2011-10-20 16:37:41 +02:00
Steven Gravell
3c7a5804e9 Add overlay command to run overlays only
required for building on a different machine to what your live
config is kept on. This way you can build on one machine,
distribute to new machine, then run overlays against a live
config to prevent accidently running code against a live
config in a development or ci environment.
2011-10-20 16:33:19 +02:00
Joseph Wayne Norton
4a5114b79f Setup code path prior to calling edoc
Setup code path prior to calling edoc so that edown, asciiedoc,
and the like can work properly when generating their own
documentation.
2011-10-20 16:32:05 +02: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
Jan Klötzke
0ce5cbab06 rebar_file_utils: simplify commands on Windows 2011-10-20 16:27:35 +02:00
Jan Klötzke
3f9b346dec Fix the 'ct' target to work on Windows with MSYS 2011-10-20 16:27:35 +02:00
Jan Klötzke
85575fca65 rebar_app_utils: fix git hook for Windows 2011-10-20 16:27:35 +02:00
Jan Klötzke
b535b5eea8 rebar_utils:sh/2: remove bash invocation on Windows
Currently rebar_utils:sh/2 will invoke all commands through bash.exe if
found. Otherwise the command will be executed directly. Despite the fact
that the caller cannot know if the command is executed with Unix or
Windows semantics it leads to problems with MSYS's automatic path name
translation.

Therefore remove bash usage on Windows to get a consistent behavior and
to avoid the peculiarities of MSYS's automatic path conversion. Instead
use cmd.exe as its typically needed by most commands.
2011-10-20 16:27:35 +02:00
Matt Campbell
36fe2c460c Don't run erl_args through set_trim
Args provided by erlsrv.exe were being mostly
discarded due to being processed through set_trim
2011-10-20 16:26:28 +02:00
joewilliams
fb8732085e Better code path handling during upgrades
While building a upgrade package rebar will add new paths to the
internal erlang path, these paths and their order have effects on how
the package is built. This patch should fix some corner cases where a
user can receive a "undefined application" error.
2011-10-17 18:40:45 -07:00
joewilliams
644bb0a312 Copy sys.config into upgrade tarball
While building an upgrade the sys.config file should be copied into the
upgrade tarball so release_handler:install_releases/1 does not clobber
the existing configuration from the application environment.
2011-10-17 14:53:27 -07:00
joewilliams
f82028a544 More descriptive logging for upgrade systools cmds
In debugging upgrade issues it is sometimes difficult to know which
systools step a error ocurred at, a little extra logging to fix that.
2011-10-15 10:24:40 -07:00
Jon Meredith
5775746758 Remove modules that fail coverage from the list 2011-10-14 17:10:11 +02:00
Tim Watson
6dfcd8b9f2 Support for custom version commands
This patch adds support for customising the way in which rebar generates
version numbers for app.src files using the `{vsn,Spec}` approach.
Whilst the existing `{vsn,ScmName::atom()}` syntax will continue to
work, users can also pass `{vsn,{cmd,Cmd::string()}}` in which
case the provided *command* will be used. For example:

```erlang
{application, doodah,
 [
  {vsn, {cmd, "git rev-parse --short HEAD"}}]}.
```
2011-10-11 11:23:23 +02:00
Tuncer Ayaz
5a0aa04b20 Cleanup deprecations now that R14B04 is released 2011-10-06 17:06:08 +02:00
joewilliams
b7bcf5528b Handle vm.args properly while building upgrades
This patch corrects the vm.args behavior while building upgrade tarballs
by copying the file from the release into the upgrade. Additionally it
patches the dummy runner script in the upgrade test project to work
properly.
2011-10-05 20:23:07 -07: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
Joe Williams
0279cb2fb9 Merge pull request #139 from Mistagrooves/syntax_errors_start_erl_batch
@ characters causes windows start_erl error
2011-09-26 08:02:56 -07:00
Mistagrooves
8549db72d4 @ characters before elses were causing the script to not run 2011-09-26 10:37:23 -04:00
Joe Williams
4ddfb3d235 Merge pull request #135 from mokele/runner-vm-args-fix
fix vm.args checks by always using $VMARGS_PATH
2011-09-21 08:27:02 -07:00
Steven Gravell
fbd26143bb fix vm.args checks by always using $VMARGS_PATH 2011-09-21 16:09:56 +01:00
Matt Campbell
9bf31b7389 Update Windows runner script usage blurb 2011-09-20 19:45:52 +02:00
Joe Williams
6656ead035 Merge pull request #133 from joewilliams/sysconfig1
Get rid of app.config
2011-09-20 09:52:59 -07:00
joewilliams
cb5056b2e3 Get rid of app.config
app.config has been a long standing erroneous file in rebar. Erlang/OTP
documentation suggests a sys.config file instead. This file is stored in
the releases/VSN directory. This does a few things but most importantly
it ensures your config (contained in the application environment)
survives a hot upgrade. It also has the advantage of allowing the
configuration of the application to be versioned along side the
application code. This patch flips rebar to use sys.config rather than
app.config.

Additionally it makes this flip to vm.args as well, making them
versioned just like sys.config.

This patch also includes runner script changes to support the old
etc/app.config config file location and support for Windows.

Thanks to mokele for the initial work and kick in the pants to make this
finially happen.
2011-09-20 09:44:41 -07:00
Matt Campbell
5998c6c721 Add console command to windows runner script 2011-09-20 17:26:39 +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
fa1bbc6702 Fix regressions in rebar_file_utils 2011-09-15 18:39:14 +02:00
Tuncer Ayaz
317eeb72e0 Fix Dialyzer warning 2011-09-08 22:54:44 +02:00