summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Thackray <stuart.thackray@gmail.com>2018-12-11 09:22:30 +0200
committerStuart Thackray <stuart.thackray@gmail.com>2018-12-11 09:22:30 +0200
commit63fcfa9db0f1be3bb3f488259d77f26bceaaf0c1 (patch)
tree00115939e7fa3687e45c7fd7188f04a509c9773d
parentebfa797c1f5d038b99beaf658757d974412a15c7 (diff)
Tidy Deps plugin to provide the download/3
For issue https://github.com/erlang/rebar3/issues/1974 Revert "add rebar.lock to template gitignore" This reverts commit 8fb8a91130e0e5c239bb837b9adc4ad71e5806b8.
-rw-r--r--priv/templates/gitignore4
-rw-r--r--src/rebar_git_resource.erl4
-rw-r--r--src/rebar_hg_resource.erl4
3 files changed, 8 insertions, 4 deletions
diff --git a/priv/templates/gitignore b/priv/templates/gitignore
index 9d7e9c5..f1c4554 100644
--- a/priv/templates/gitignore
+++ b/priv/templates/gitignore
@@ -13,11 +13,7 @@ erl_crash.dump
.rebar
logs
_build
-<<<<<<< HEAD
-rebar.lock
-=======
.idea
*.iml
rebar3.crashdump
*~
->>>>>>> upstream/master
diff --git a/src/rebar_git_resource.erl b/src/rebar_git_resource.erl
index 0ca6627..cec7bfc 100644
--- a/src/rebar_git_resource.erl
+++ b/src/rebar_git_resource.erl
@@ -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);
diff --git a/src/rebar_hg_resource.erl b/src/rebar_hg_resource.erl
index 8139d04..22532b5 100644
--- a/src/rebar_hg_resource.erl
+++ b/src/rebar_hg_resource.erl
@@ -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);