Browse Source

Tidy Deps plugin to provide the download/3

For issue https://github.com/erlang/rebar3/issues/1974
pull/1976/head
Stuart Thackray 6 years ago
parent
commit
1a26a9a719
2 changed files with 8 additions and 0 deletions
  1. +4
    -0
      src/rebar_git_resource.erl
  2. +4
    -0
      src/rebar_hg_resource.erl

+ 4
- 0
src/rebar_git_resource.erl View File

@ -6,6 +6,7 @@
-export([init/2,
lock/2,
download/3,
download/4,
needs_update/2,
make_vsn/2]).
@ -123,6 +124,9 @@ download(TmpDir, AppInfo, State, _) ->
{error, Error}
end.
download(Dir, AppInfo, State) ->
download_(Dir, AppInfo, State).
download_(Dir, {git, Url}, State) ->
?WARN("WARNING: It is recommended to use {branch, Name}, {tag, Tag} or {ref, Ref}, otherwise updating the dep may not work as expected.", []),
download_(Dir, {git, Url, {branch, "master"}}, State);

+ 4
- 0
src/rebar_hg_resource.erl View File

@ -6,6 +6,7 @@
-export([init/2,
lock/2,
download/3,
download/4,
needs_update/2,
make_vsn/2]).
@ -72,6 +73,9 @@ download(TmpDir, AppInfo, State, _) ->
{error, Error}
end.
download(Dir, AppInfo, State) ->
download_(Dir, AppInfo, State).
download_(Dir, {hg, Url}, State) ->
?WARN("WARNING: It is recommended to use {branch, Name}, {tag, Tag} or {ref, Ref}, otherwise updating the dep may not work as expected.", []),
download_(Dir, {hg, Url, {branch, "default"}}, State);

Loading…
Cancel
Save