If you happen to fetch a zip archive of the git repo and try to build
from that, you may, for example, ask erlc to build src/._rebar.erl.
._* are OS X resource forks and not real .erl files. This may also
happen with network filesystems on OS X. To fix that, limit the
files compiled by rebar to include only those which start with
a letter or a digit.
Running 'rebar list-templates' can take quite a long time, when it has
to search the file system. To fix that, make list-templates not recurse
by default. To enable recursion, run 'rebar -r list-templates'.
This commit add support for reading mustache 'lists' from files, so you
can use the list section functionality when templating things.
An example of the list syntax is as follows:
{package_commands, {list, [[{name, "riak"}], [{name, "riak-admin"}], [{name, "search-cmd"}]]}}.
Then you can, for each of the list elements, render some text:
{{#package_commands}}
chmod +x bin/{{name}}
{{/package_commands}}
Add support for defining template variables of the following form:
{variables, [{appid, "mochiwebapp"},
{author, "Mochi Media <dev@mochimedia.com>"},
{year, "2010"},
{version, "0.1"},
{port, 8080},
{dest, "{{appid}}"}]}.
Where dest may be overridden on the commandline but will default to
being the appid. Mochiweb uses this so that we can create new
projects from the template in a configurable directory.
So
$ rebar create template=mochiwebapp dest=foo appid=bar
I thought about special casing dest but figured it might be generally
useful to be able to nest template vars.
However this patch only does one level of resolution. So if
{variables, [{foo, "{{bar}}"},
{bar, "{{foo}}"}]}.
then bar will end up being the literal string {{bar}} and foo the
literal string {{foo}}.
{file,In,Out,true} = render with mustache
{file,In,Out,false} = do not render with mustache (leave as-is)
old-form {file,In,Out} is equivalent to {file,In,Out,true}