From 8fb8a91130e0e5c239bb837b9adc4ad71e5806b8 Mon Sep 17 00:00:00 2001 From: Stuart Thackray Date: Tue, 14 Jun 2016 16:05:18 +0200 Subject: add rebar.lock to template gitignore --- priv/templates/gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/priv/templates/gitignore b/priv/templates/gitignore index ced0c5e..617aab8 100644 --- a/priv/templates/gitignore +++ b/priv/templates/gitignore @@ -13,3 +13,4 @@ erl_crash.dump .rebar logs _build +rebar.lock -- cgit v1.1 From 1a26a9a71997f6cd7d8286f7ff30626edaf4f903 Mon Sep 17 00:00:00 2001 From: Stuart Thackray Date: Tue, 11 Dec 2018 09:12:54 +0200 Subject: Tidy Deps plugin to provide the download/3 For issue https://github.com/erlang/rebar3/issues/1974 --- src/rebar_git_resource.erl | 4 ++++ src/rebar_hg_resource.erl | 4 ++++ 2 files changed, 8 insertions(+) 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); -- cgit v1.1 From 4d3eb5604cab8c2320ce119a467b4ca04b60c78a Mon Sep 17 00:00:00 2001 From: Stuart Thackray Date: Tue, 11 Dec 2018 09:22:15 +0200 Subject: Revert "add rebar.lock to template gitignore" This reverts commit 8fb8a91130e0e5c239bb837b9adc4ad71e5806b8. --- priv/templates/gitignore | 4 ---- 1 file changed, 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 -- cgit v1.1 From 63fcfa9db0f1be3bb3f488259d77f26bceaaf0c1 Mon Sep 17 00:00:00 2001 From: Stuart Thackray Date: Tue, 11 Dec 2018 09:22:30 +0200 Subject: 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. --- priv/templates/gitignore | 4 ---- src/rebar_git_resource.erl | 4 ++++ src/rebar_hg_resource.erl | 4 ++++ 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); -- cgit v1.1 From d9adc89cf43a83f545c9da9295d45184a412714b Mon Sep 17 00:00:00 2001 From: Stuart Thackray Date: Tue, 18 Dec 2018 10:39:46 +0200 Subject: Code documentation that the PR was for backwards compatility --- src/rebar_git_resource.erl | 6 +++++- src/rebar_hg_resource.erl | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/rebar_git_resource.erl b/src/rebar_git_resource.erl index cec7bfc..b2db6ca 100644 --- a/src/rebar_git_resource.erl +++ b/src/rebar_git_resource.erl @@ -6,11 +6,14 @@ -export([init/2, lock/2, - download/3, download/4, needs_update/2, make_vsn/2]). +%% For backward compatibilty +-export ([ download/3 + ]). + -include("rebar.hrl"). %% Regex used for parsing scp style remote url @@ -124,6 +127,7 @@ download(TmpDir, AppInfo, State, _) -> {error, Error} end. +%% For backward compatibilty download(Dir, AppInfo, State) -> download_(Dir, AppInfo, State). diff --git a/src/rebar_hg_resource.erl b/src/rebar_hg_resource.erl index 22532b5..763803c 100644 --- a/src/rebar_hg_resource.erl +++ b/src/rebar_hg_resource.erl @@ -6,11 +6,15 @@ -export([init/2, lock/2, - download/3, download/4, 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()}. @@ -73,6 +77,7 @@ download(TmpDir, AppInfo, State, _) -> {error, Error} end. +%% For backward compatibilty download(Dir, AppInfo, State) -> download_(Dir, AppInfo, State). -- cgit v1.1