summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2014-12-06 22:49:15 -0500
committerFred Hebert <mononcqc@ferd.ca>2014-12-06 22:49:15 -0500
commitac077e87eed86aedec177548c9a8d382271eb127 (patch)
treec0e5b9eb2ca19db13b2cebea2c01ae532e7b1494
parent40ef004f39185835bdfe6939fce5c6235325bfbf (diff)
parentbee15d62a0a381996c00f6d38ea953fa329c2372 (diff)
Merge pull request #47 from tsloughter/master
version in source dep element is no longer used, support leaving it out
-rw-r--r--src/rebar_prv_install_deps.erl12
-rw-r--r--src/rebar_prv_lock.erl1
2 files changed, 8 insertions, 5 deletions
diff --git a/src/rebar_prv_install_deps.erl b/src/rebar_prv_install_deps.erl
index 5375f4b..00ef9c5 100644
--- a/src/rebar_prv_install_deps.erl
+++ b/src/rebar_prv_install_deps.erl
@@ -351,11 +351,15 @@ parse_deps(State, DepsDir, Deps) ->
,ec_cnv:to_binary(Vsn)) | PkgDepsAcc]};
(Name, {SrcDepsAcc, PkgDepsAcc}) when is_atom(Name) ->
{SrcDepsAcc, [ec_cnv:to_binary(Name) | PkgDepsAcc]};
- ({Name, Vsn, Source}, {SrcDepsAcc, PkgDepsAcc}) when is_tuple (Source) ->
- Dep = new_dep(State, DepsDir, Name, Vsn, Source),
+ ({Name, Source}, {SrcDepsAcc, PkgDepsAcc}) when is_tuple (Source) ->
+ Dep = new_dep(State, DepsDir, Name, [], Source),
{[Dep | SrcDepsAcc], PkgDepsAcc};
- ({Name, Vsn, Source, _Level}, {SrcDepsAcc, PkgDepsAcc}) when is_tuple (Source) ->
- Dep = new_dep(State, DepsDir, Name, Vsn, Source),
+ ({Name, _Vsn, Source}, {SrcDepsAcc, PkgDepsAcc}) when is_tuple (Source) ->
+ Dep = new_dep(State, DepsDir, Name, [], Source),
+ {[Dep | SrcDepsAcc], PkgDepsAcc};
+ ({Name, Source, Level}, {SrcDepsAcc, PkgDepsAcc}) when is_tuple (Source)
+ , is_integer(Level) ->
+ Dep = new_dep(State, DepsDir, Name, [], Source),
{[Dep | SrcDepsAcc], PkgDepsAcc}
end, {[], []}, Deps).
diff --git a/src/rebar_prv_lock.erl b/src/rebar_prv_lock.erl
index aba5080..9131777 100644
--- a/src/rebar_prv_lock.erl
+++ b/src/rebar_prv_lock.erl
@@ -39,7 +39,6 @@ do(State) ->
%% If source is tuple it is a source dep
%% e.g. {git, "git://github.com/ninenines/cowboy.git", "master"}
{rebar_app_info:name(Dep)
- ,rebar_app_info:original_vsn(Dep)
,rebar_fetch:lock_source(Dir, Source)
,rebar_app_info:dep_level(Dep)}
end, AllDeps),