简体   繁体   English

钢筋配置中元素的含义

[英]Meaning of elements in Rebar deps configuration

We're using rebar to pull dependencies for our project, many of them from github. 我们使用rebar为我们的项目提取依赖项,其中许多来自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. 我理解得足够了,我通过反复试验了解了一些事情(例如,如何指定标签和变更集而不是分支),但我的google-fu无法找到任何关于什么的综合文档选项可用或他们做什么。

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. 我特别想知道第二个值的目的是(通常是空字符串,但我偶尔会看到版本号和通配符),但是有关源控制选项的更多信息,或者只是文档一般会有所帮助。

You can find the full documentation of rebar here: 您可以在此处找到钢筋的完整文档:

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

A detailed rebar.config sample, showing most of the available options is available at: 详细的rebar.config示例显示了大多数可用选项,可在以下位置找到:

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

Reading from the deps section: 阅读deps部分:

%% 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). 如您所见,您指出的特定参数与Erlang应用程序的版本(用作OTP应用程序)有关。 Versions are indicated in the Erlang Application files . Erlang应用程序文件中指出了版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM