The value of the items in the depbar setting

We use rebar to pull dependencies for our project, many of them from github. Our configuration looks something like this:

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

I understand enough to get through, and I learned a couple of things by trial and error (for example, how to specify tags and changes, not branches), but my google-fu cannot find any comprehensive documentation about which options are available or what are they doing.

I specifically wonder about the purpose of the second value (often an empty string, but sometimes I see version numbers and wildcards in it), but more information about version control options or just documentation in general would be useful.

+6
source share
1 answer

You can find the full documentation on fittings here:

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

A detailed rebar.config example showing most of the options available 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 that you specified refers to the version of the Erlang application (intended as an OTP application). Versions are listed in Erlang application files .

+8
source

Source: https://habr.com/ru/post/913749/


All Articles