gpt4 book ai didi

erlang - Rebar deps 配置中元素的含义

转载 作者:行者123 更新时间:2023-12-04 14:32:31 29 4
gpt4 key购买 nike

我们正在使用 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 Application files 中指明.

关于erlang - Rebar deps 配置中元素的含义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10252555/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com