繁体   English   中英

钢筋配置中元素的含义

[英]Meaning of elements in Rebar deps configuration

我们使用rebar为我们的项目提取依赖项,其中许多来自github。 我们的配置看起来像:

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

我理解得足够了,我通过反复试验了解了一些事情(例如,如何指定标签和变更集而不是分支),但我的google-fu无法找到任何关于什么的综合文档选项可用或他们做什么。

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

您可以在此处找到钢筋的完整文档:

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

详细的rebar.config示例显示了大多数可用选项,可在以下位置找到:

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

阅读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"}]}]}.

如您所见,您指出的特定参数与Erlang应用程序的版本(用作OTP应用程序)有关。 Erlang应用程序文件中指出了版本。

暂无
暂无

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

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