summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2018-12-18 07:14:02 -0500
committerGitHub <noreply@github.com>2018-12-18 07:14:02 -0500
commit06f4b7e4c31591683b88b6a0d472977e5885ade5 (patch)
treef2443cf31338acc29a6e6b32b835bbd69d14e88b /src
parent8e28561d4e14ea85d42d17ab5a0f17f5f1c696d2 (diff)
parentd9adc89cf43a83f545c9da9295d45184a412714b (diff)
Merge pull request #1976 from stuart-thackray/tidyDepExport
re-expose download/3 for backwards compatibility in git deps related plugins
Diffstat (limited to 'src')
-rw-r--r--src/rebar_git_resource.erl8
-rw-r--r--src/rebar_hg_resource.erl9
2 files changed, 17 insertions, 0 deletions
diff --git a/src/rebar_git_resource.erl b/src/rebar_git_resource.erl
index 0ca6627..b2db6ca 100644
--- a/src/rebar_git_resource.erl
+++ b/src/rebar_git_resource.erl
@@ -10,6 +10,10 @@
needs_update/2,
make_vsn/2]).
+%% For backward compatibilty
+-export ([ download/3
+ ]).
+
-include("rebar.hrl").
%% Regex used for parsing scp style remote url
@@ -123,6 +127,10 @@ download(TmpDir, AppInfo, State, _) ->
{error, Error}
end.
+%% For backward compatibilty
+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);
diff --git a/src/rebar_hg_resource.erl b/src/rebar_hg_resource.erl
index 8139d04..763803c 100644
--- a/src/rebar_hg_resource.erl
+++ b/src/rebar_hg_resource.erl
@@ -10,6 +10,11 @@
needs_update/2,
make_vsn/2]).
+
+%% For backward compatibilty
+-export([ download/3
+ ]).
+
-include("rebar.hrl").
-spec init(atom(), rebar_state:t()) -> {ok, rebar_resource_v2:resource()}.
@@ -72,6 +77,10 @@ download(TmpDir, AppInfo, State, _) ->
{error, Error}
end.
+%% For backward compatibilty
+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);