Pergunta

We're using rebar to pull dependencies for our project, many of them from github. Our config looks something like:

{deps, [
        {cowboy, "", {git, "git://github.com/extend/cowboy.git", {branch, "master"}}}
       ]}.

I understand enough to get by, and I've learned a couple things by trial and error (for example, how to specify tags and changesets rather than branches), but my google-fu is unable to find any sort of comprehensive documentation on what options are available or what they do.

I'm specifically wondering about the purpose of the second value is (often empty string, but I occasionally see version numbers and wildcards in it), but more info about source control options, or just documentation in general would be helpful.

Foi útil?

Solução

You can find the full documentation of rebar here:

https://github.com/rebar/rebar/wiki

A detailed rebar.config sample, showing most of the available options is available at:

https://github.com/rebar/rebar/blob/master/rebar.config.sample

Reading from the deps section:

%% What dependencies we have, dependencies can be of 3 forms, an application
%% name as an atom, eg. mochiweb, a name and a version (from the .app file), or
%% an application name, a version and the SCM details on how to fetch it (SCM
%% type, location and revision). Rebar currently supports git, hg, bzr and svn.
{deps, [application_name,
        {application_name, "1.0.*"},
        {application_name, "1.0.*",
         {git, "git://github.com/basho/rebar.git", {branch, "master"}}},
        {application_name, "1.0.*",
         {git, "git://github.com/basho/rebar.git", {branch, "master"}},
         [{alt_url, "https://github.com/basho/rebar.git"}]}]}.

As you can see, the specific parameter you've pointed out relates to the version of the Erlang application (intended as an OTP application). Versions are indicated in the Erlang Application files.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top