簡體   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