Просмотр исходного кода

Merge pull request #1976 from stuart-thackray/tidyDepExport

re-expose download/3 for backwards compatibility in git deps related plugins
pull/1980/head
Fred Hebert 6 лет назад
committed by GitHub
Родитель
Сommit
06f4b7e4c3
Не найден GPG ключ соответствующий данной подписи Идентификатор GPG ключа: 4AEE18F83AFDEB23
2 измененных файлов: 17 добавлений и 0 удалений
  1. +8
    -0
      src/rebar_git_resource.erl
  2. +9
    -0
      src/rebar_hg_resource.erl

+ 8
- 0
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);

+ 9
- 0
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);

Загрузка…
Отмена
Сохранить