Commit graph

521 commits

Author SHA1 Message Date
Alexey Romanov
7c40d624dc Merge commit 'upstream/master' 2011-03-05 14:11:31 +03:00
Tuncer Ayaz
25c0226ab9 Update runner script in test project 2011-03-04 19:39:45 +01:00
Alexey Romanov
6c3c3606e5 Add console_clean to usage message for simplenode 2011-03-04 19:37:34 +01:00
joewilliams
0f99ba2280 Fix bug that causes appup generation to fail
This commit changes how rebar determines which apps have been
updated, added and removed from a release during appup generation.
Rather than use app files it now determines this from the rel file
in each version of the release. In addition it fixes a bug reported
on the mailing list when generating appups when an application has
been added or removed from either release.
2011-03-03 16:02:37 -08:00
Tuncer Ayaz
d725e5fe92 Add Christopher Brown to THANKS file 2011-03-03 17:40:24 +01:00
Christopher Brown
0a603435f5 honor local deps before code path 2011-03-02 21:06:30 -08: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
joewilliams
90d2ce5e07 Ignore app files not in ebin 2011-02-25 18:38:50 +01:00
Tuncer Ayaz
2cff499a34 Fix regression in rebar_lfe_compiler 2011-02-22 17:28:49 +01:00
Tuncer Ayaz
3356c2d9e8 Use erlang:function_exported/3 2011-02-21 17:42:10 +01:00
Tuncer Ayaz
c6f6e8a572 Fix Dialyzer warning and slightly reformat code 2011-02-21 15:43:07 +01:00
Tim Dysinger
6f97e6e55b Add up to date instructions in case LFE is missing 2011-02-21 15:29:50 +01:00
Tim Dysinger
5049da8ec4 Add fail_on_warning support for LFE 2011-02-21 15:29:25 +01:00
Tim Watson
3db8f585f1 Add -spec support to rebar_ct command line
This change adds support for executing ct test runs based on test
specificiations, which was missing previously. The rebar_ct module
now looks for any number of files with a name ending in `test.spec`
and if it finds one or more, passes these after the `-spec` argument
to ct_run instead of explicitly configuring the config, user config
and coverage config variables.

When no specifications are found, then the module behaves as it did
before this change, and both the ct1 and (new) ct2 integration tests
appear to show this is a backwards compatible patch.
2011-02-21 15:08:24 +01:00
Alexey Romanov
48d23b90ac Add console_clean to usage message for simplenode. 2011-02-21 12:57:24 +03:00
Alexey Romanov
35a3391e7b Support passing plain arguments to simplenode.
`init:get_plain_arguments()` returns `["console", "more_args"]` when
started with `$APP_NAME console more_args`, but `["console"]` when
started with `$APP_NAME start more_args`. This patch makes `start`
behave like `console` in this respect.
2011-02-21 12:46:57 +03:00
Alexey Romanov
7dc371d8a3 Merge branch 'master' of https://github.com/basho/rebar 2011-02-21 12:41:20 +03:00
Dave Smith
6056c63eed Clean up and simplify {vsn, VCS} support 2011-02-18 10:59:57 +01:00
Tuncer Ayaz
01a7473dac Add {vsn,Vcs} support for bzr, hg and svn 2011-02-17 19:23:43 +01:00
Adam Kocoloski
b0860da124 Expand {vsn,git} in app.src to git-describe output 2011-02-17 19:17:28 +01:00
Tuncer Ayaz
0a06a53c8e Add Anders 'andekar' to THANKS file 2011-02-17 19:15:53 +01:00
joewilliams
1e9b2b844b Clean up trailing whitespace 2011-02-17 10:12:32 -08:00
joewilliams
4e8dcfbfad Clean up rebar_appups and rebar_upgrade 2011-02-17 17:13:19 +01:00
Tuncer Ayaz
377c9e86d5 Add PropEr support 2011-02-16 17:36:11 +01:00
joewilliams
c6da0b3ef6 Fix generate-appups regression (atom vs list) 2011-02-16 17:07:12 +01:00
joewilliams
11bf6b4aab Add 'generate-appups' command
To further support OTP releases I have added support for generating
application appup files. These include instructions that systools uses
to generate a relup file which contains the low level instructions
needed to perform a hot code upgrade. My goal with this module is to
produce "good enough" appup files or at least a skeleton to help one get
started with something more complex. If an appup file already exists for
an application this command will not attempt to create a new one.

Usage:
$ rebar generate-appups previous_release=/path/to/old/version

Generally this command will be run just before 'generate-upgrade'.
2011-02-15 18:33:18 +01:00
Anthony Ramine
9ee8ed9181 Give an absolute path to code:add_path/1
If an app uses -include_lib for its own included files, compilation
fails if the app directory isn't in $ERL_LIBS because code:lib_dir/1
will return an error. An absolute path needs to be added to code path
instead of just "ebin".
2011-02-15 18:32:42 +01:00
Tuncer Ayaz
1b10807193 Remove gratuitous spaces 2011-02-15 17:26:01 +01:00
Tim Watson
7810d7bf7c Add common_test suite template
This change adds a simple common_test suite template
that can be instantiated with the name of a module
under test like so:

`rebar create template=ctsuite testmod=mymodule`

The template creates an empty test suite in the test
directory, automatically exports test functions and
sets up a first, skipped test function.
2011-02-15 17:21:56 +01:00
Joseph Wayne Norton
1979da9ee2 Clarify trailing slash for PIPE_DIR
The trailing slash for PIPE_DIR is necessary for
both start and attach operations.
2011-02-15 17:05:38 +01:00
Tuncer Ayaz
e407838bab Document eunit_first_files 2011-02-13 18:11:29 +01:00
Tuncer Ayaz
b70f374f89 Remove export_all directive 2011-02-13 16:38:04 +01:00
Joseph Wayne Norton
e4cd50e2a3 Add eunit_first_files option 2011-02-13 16:26:48 +01:00
David Reid
3241165ced Support 2 forms of implicit HEAD for git
In git origin/HEAD is a pointer to the default branch.  This patch
allows two alternatives to explicitly specifying "HEAD" in git VC specs.

The first is a 2 arity form {git, Url} and the second is {git, Url, ""}
which worked in pre-update-deps rebars.
2011-02-13 16:05:42 +01:00
Tuncer Ayaz
63de05d914 Clean up code 2011-02-06 17:41:04 +01:00
Tuncer Ayaz
7710ab0d9f Fix warning 2011-01-31 19:11:50 +01:00
Tuncer Ayaz
c466076ffb Clean up emacs file local variables 2011-01-31 17:55:36 +01:00
Tuncer Ayaz
1ee21c523f Update nodetool in upgrade_project 2011-01-31 17:55:02 +01:00
Tuncer Ayaz
f04a1c9750 Add Tim Watson to THANKS file 2011-01-30 17:54:07 +01:00
Tuncer Ayaz
b18194e24d Fix file existence checks 2011-01-29 17:37:15 +01:00
Tuncer Ayaz
0e729bf90e Fix Dialyzer warnings in rebar_upgrade 2011-01-29 16:18:14 +01:00
Tim Watson
7ac3a5aa9b Move BUILD_TIME and VCS_INFO macros
I have moved these macros from rebar_core.erl to rebar.erl
in order to prevent eunit tests from failing (which they
currently are).
2011-01-29 16:16:37 +01:00
Tuncer Ayaz
b894682ba9 Fix bug 294 2011-01-29 15:37:54 +01:00
Tuncer Ayaz
926baa1c31 Use filename:join instead of ?FMT 2011-01-28 20:15:22 +01:00
Tuncer Ayaz
f4070bfad7 Update shell completion: generate-upgrade
Add generate-upgrade and previous_release=.
2011-01-28 19:10:19 +01:00
Tuncer Ayaz
8f5bfea9c4 Fix help: previous_release is mandatory 2011-01-28 19:05:20 +01:00
Tuncer Ayaz
e53873f549 Update THANKS file 2011-01-27 18:38:48 +01:00
joewilliams
5298e93a18 Add 'generate-upgrade' command
To support OTP release upgrades I have added support for building
upgrade packages. Support for this is included in the
rebar_upgrade module, specifically generate_upgrade/2. It requires
one variable to be set on the command line 'previous_release' which
is the absolute path or relative path from 'rel/' to the previous
release one is upgrading from. Running an upgrade will create the
needed files, including a relup and result in a tarball containing
the upgrade being written to 'rel/'. When done it cleans up the
temporary files systools created.

Usage:
$ rebar generate-upgrade previous_release=/path/to/old/version

This also includes a dummy application that can be used to test
upgrades as well as an example.

Special thanks to Daniel Reverri, Jesper Louis Andersen and
Richard Jones for comments and patches.
2011-01-27 18:37:39 +01:00
Tuncer Ayaz
3fd3bfc89a Fix circular dependency 2011-01-27 15:57:55 +01:00
Dave Smith
a8066b35a9 Use an order independent method for exact matches when looking for command candidates 2011-01-25 21:29:08 -07:00