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.
the rebar. config file at the application root. each top-level app's (in apps/ or libs/ ) rebar.
The lock file contains information regarding code dependencies, including immutable references for source dependencies like those in git or hg, and their versions along with expected hashes for packages.
rebar is an Erlang build tool that makes it easy to compile and test Erlang applications, port drivers and releases. rebar is a self-contained Erlang script, so it's easy to distribute or even embed directly in a project.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With