【问题标题】:Meaning of elements in Rebar deps configurationRebar deps 配置中元素的含义
【发布时间】:2012-05-02 09:53:58
【问题描述】:

我们正在使用 rebar 为我们的项目提取依赖项,其中许多来自 github。我们的配置类似于:

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

我已经足够了解,并且通过反复试验学到了一些东西(例如,如何指定标签和变更集而不是分支),但是我的 google-fu 无法找到任何全面的有关可用选项或它们的作用的文档。

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

【问题讨论】:

    标签: erlang rebar


    【解决方案1】:

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

    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 Application files 中注明。

    【讨论】:

    • 我查看了 wiki,但没有找到太多关于 deps 的信息。不过,我还没有遇到 rebar.config.sample。谢谢。
    猜你喜欢
    • 2013-12-11
    • 2015-08-16
    • 2013-07-03
    • 2012-12-01
    • 2011-10-31
    • 2013-12-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多